Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to set page title with a common suffix #461

Open
frankieroberto opened this issue Feb 4, 2025 · 0 comments
Open

Make it easier to set page title with a common suffix #461

frankieroberto opened this issue Feb 4, 2025 · 0 comments

Comments

@frankieroberto
Copy link
Contributor

Currently we have this in the default layout file:

 <title>{% block pageTitle %}NHS prototype kit{% endblock %}</title>

This makes it possible to override the <title> tag on pages by setting the pageTitle block, but does not make it easy to follow the best practice of having a common suffix for the site name, for example "Achalasia – NHS".

We could improve this by changing the layout to something like:

 <title>{% block pageTitle %}{% if pageName %}{{ pageName }} - {% endif %}}{{ serviceName }}{% endblock %}</title>

Which would then allow you to set a pageName attribute on pages and have your serviceName as a suffix.

You could still override the whole thing by using the existing pageTitle block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant