Closed frankieroberto closed 1 year ago
Then pages could use
{% set title = "" %}
to set the page title, whilst having a service-wide suffix.
Worth noting that this would be a change in behaviour compared to the documentation for pageTitle
on https://design-system.service.gov.uk/styles/page-template/
Maybe that's already the case for other options on that page but I think there's value in trying to avoid having two different ways of doing things.
But equally if {% block pageTitle %}
still works as well, maybe that's OK.
Possibly related: #1952?
@frankieroberto nah thats unrelated - thats just us not titling our internal pages properly :)
@36degrees I don't think this conflicts - {% block pageTitle %}
is still available, title
is just adding value here by constructing [title] - [serviceName] - GOV.UK for you in the Prototype Kit. But I agree the naming might be tricky. Ah naming. pageName
?
Currently when a new prototype is generated, the default layout file extends
govuk-prototype-kit/layouts/govuk-branded.html
which sets the title tag for each page to beGOV.UK Prototype Kit
.Prototypes can override this by setting the
pageTitle
block in either their own layout file, or on individual pages. However it’s relatively easy to forget this.Perhaps this could be made easier by setting the default page title to be
{{ title }} - {{ serviceName}} - GOV.UK
which would match the GDS style guide for page titles. Then pages could use{% set title = "" %}
to set the page title, whilst having a service-wide suffix.The templates installed using the admin interface could set default page titles too.
See discussion on Slack.