2

There used to be something like appendTitleValue that could be overwritten from a template. This seems to be gone in the last major release.

Any chance to get that back or am I missing something here? It’s quite an important feature as it has direct impact on good, site specific titles generating SEO value.

Any hint is much appreciated.

1 Answer 1

4

Looks like this was a setting in the Sprout SEO Plugin for Craft 2, as a quick Google search for 'craft appendTitleValue' will tell you. Apparently, it has been removed in the version of the plugin for Craft 3.

I can't speak to the developer's motivation, but a likely explanation is that this is something you can and should handle in your templates. If you're not using the Sprout SEO plugin right now, you can just include the site name (or whatever you want) in your template:

<title>{{ entry.title }} | {{ currentSite.name }}</title>

If you are using the Sprout SEO plugin, checkout the documentation on template overrides for specific meta fields. The following code should accomplish roughly the same thing:

{% do craft.sproutSeo.meta({
    title: "#{entry.title} | #{currentSite.name}",
}) %}
1
  • 1
    The do craft.sproutSeo.meta tag gives the flexibility to append a title value from different points in the Twig template being loaded, if you need to customize things in the templates. In Sprout SEO's Globals->Customization settings there are three related settings: Character used between Title segments, Append value to all Meta Titles, and Display Append Meta Title Value on Homepage Mar 1 at 13:25

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.