I can get Craft to generate page titles for entries and individual pages using:

{% set title = entry.title %}


{% set title = "News and Insights" %}

But I need to be able to generate a full page title for an entry, that includes the section name, for example:

News Item | News and Insights | Company Name

Can anyone please explain how...?

Many thanks!

1 Answer 1

{{ entry.section }} - {{ entry.title }}

Here are a list of properties you can get from the Entry model:


So you could do

{% set title = "#{entry.section} | #{entry.title}" %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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