<p>You don't have to fill in the quote's or the curly brackets.</p>

<p>You could just put it down like this:</p>

<pre><code>{% set title = category.title %}
</code></pre>

<p>You already "called" twig so you dont need to do that again.</p>

CC BY-SA 3.0
2017-06-15T15:27:58.457Z
2017-06-15T15:27:58.457Z
Justin Dekkers
<p>All I'm trying to do is put the category title on a category listing page into the title tag.
So I've got the variable set up, but if I add the category title tag:</p>

<pre><code>{% set title = "{{ category.title }}" %}
</code></pre>

<p>The end result is this</p>

<pre><code>&lt;title&gt;{{ category.title}}&lt;/title&gt;
</code></pre>

<p>So do I need to escape the quotes?</p>

<categories>
Category name in page title
# Category name in page title

(Asked by: username_0 on 2017-06-15)

All I'm trying to do is put the category title on a category listing page into the title tag.
So I've got the variable set up, but if I add the category title tag:
{% set title = "{{ category.title }}" %}

The end result is this
{{ category.title}}

So do I need to escape the quotes?

**Tags:** categories


---

## 1 answers

### Answer by username_1 on 2017-06-15. Score: 2 | Accepted answer

You don't have to fill in the quote's or the curly brackets.
You could just put it down like this:
{% set title = category.title %}

You already "called" twig so you dont need to do that again.


---

