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

<title>{{ category.title}}</title>

So do I need to escape the quotes?


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.