Should MetaTags feature modify the page's <title> tag?
Closed this issue · 1 comments
Might the reason for your https://github.com/EtchUK/Etch.OrchardCore.SEO#known-issues that it shouldn't alter the default OC behaviour with the <title>
tag?
Might the MetaTags feature (when enabled) just deal with the <meta>
tags, as it's already doing for property="og:title"
and property="twitter:title"
and leave alone the page's head <title>
tag, which is already handled by OC and maybe liquid templates for each ContentType in users' themes?
Let's say, for instance that user's have a FAQ and FAQ List Content Types and the site is configured to add the sitename as a trailing in the site's settings:
{% page_title Site.SiteName, position: "after", separator: " - " %}
The theme for those FAQ items, in Content-FAQ.liquid
file could have:
{% zone "PageTitle" %}
{% assign parentTranslated = "FAQ" | t %}
{% assign customTitle = Model.ContentItem.Content.TitlePart.Title | append: " - " | append: parentTranslated %}
{% page_title customTitle %}
{% endzone %}
So that all their FAQ pages are enforced to follow the format: PageTitle - FAQ - SiteName
The same would apply for a News or Blog section or any other listable content type where users might want the type of item to be included in the head <title>
tag. However, none of the trailing - FAQ - SiteName should be included in the <meta>
title tags.
Having Etch.OrchardCore.SEO interacting with the page's head <title>
too makes almost impossible to achieve this.
We've released a new version (v0.7.0
) that changes the MetaTagsPart
to use fields instead of properties on the part itself. As part of this change the module now provides an override of ContentsMetadata
that will use the meta tags title if present otherwise it falls back to the content item display text. We've decided we do want the page title to use the meta tag title field value if present by default. If you wanted to override this you can add an override of ContentsMetadata
to your theme.
Going to close this.