The SEO tab is available for all page types
When using ETF all page types inherit the PageTypeBase class in one way or another (all page type base classes in ETF inherit PageTypeBase).
One thing added by the PageTypeBase class is the SEO tab:
Properties included on the SEO tab
The SEO tab contains the following page type properties:
The edit captions for these can be overriden like for any page type property in the EPiServer language files. ETF by defaults ships with embedded translations for english and swedish.
SEO properties are rendered by the Master Page
All master pages should inherit the MasterPageBase class in ETF. Among other things this ensures that SEO properties are automatically rendered.
For example, the page type properties as specified in the screenshot above would result in the following markup inside the <head> tag of our page:
<meta name="description" content="Quite often a company is described as delivering specific products or services. However, much can be gained from presenting a company in a more personal way, in effect describing the sort of culture and attitude inherent in the company." />
<meta name="keywords" content="presentation,company,culture,attitude" />
<meta name="author" content="John Doe" />
<meta name="copyright" content="Acme Inc." />
<meta name="robots" content="index,follow" />
(Additional meta tags removed for clarity.)
SEO properties default values
SEO properties can be set either 1) explicitly by the editor or 2) by defaulting to other relevant page type properties.
If an SEO property hasn’t been set by the editor, ETF will set the property value according to a fallback property.
- Title defaults to PageName
- Description defaults to MainBody (where applicable)
- Keywords defaults to Tags
Author, Copyright, EnableIndexing, and EnableLinkFollowing do not have any fallback. The EnableIndexing and EnableLinkFollowing properties are set to true by default.
A note on the Description property
When the Description property defaults to the MainBody property it does so by stripping out all HTML tags and shortened to 160 characters.
So, if we have this in our MainBody property…
…the default fallback for the Description property will be this:
How default values are updated
A default value will be updated if a page is modified and the previous default value hasn’t been changed. The following example demonstrates this:
If an editor creates a new page and sets its name…
…the editor might not realize that the Title property (if left empty) has been set to its default value, which is the page name:
Now, if the editor edits the page name…
…the Title property will also be updated to reflect the updated page name:
However, if we set the Title property explicitly to make it differ from the page name…
…we can update the page name…
…without affecting the Title property: