1

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

{% set title = entry.title %}

and

{% 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!

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

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

https://craftcms.com/docs/templating/entrymodel

So you could do

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

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.