Meta title and meta description of widgets
You can configure the metadata for content items only for a particular MVC widget.
For example, configure only the News items that are displayed on a particular page, by a particular widget.
To do this, perform the following:
- Open the page where the widget that you want to configure is located.
- Open the widget designer, by clicking Edit.
This must be an MVC widget.
- Navigate to the advanced properties, by clicking Advanced.
- Click MetadataFields.
- In MetaTitle, enter a name of a field that belongs to the module.
For example, enter Tags
This way, the
<title> tag will be populated with the Tags of the content item.
- In MetaDescription, enter a name of a field that belongs to the module.
For example, enter Summary
This way, the MetaDescription will be populated with the summary that you created for the content item.
- In PageTitleMode, enter one of the following:
This is the default value. The page title is replaced by the item's title.
The item title is appended to the page title.
The page title will be built by the item's title and its parent's title. This value is relevant only for modules with hierarchical content types. The maximum level of the hierarchy is three levels.
- If you enter DoNotSet, the MetaTitle field will have the value of the page title.
- In SEOEnabled, enter true
This setting enables and disables the meta title and meta description fields of the particular widget.
- Click Save.
Association of metadata fields and module fields
- If you leave
MetaTitle field empty, Sitefinity CMS adds takes its value from the Title field of the static content item or from the identifier field of a dynamic content item. Otherwise, the
<title> tag is populated with the contents of the field that you have entered in MetaTitle field.
- If you leave
MetaDescription field empty, Sitefinity CMS checks whether the static or the dynamic content type has a custom field named Description.
- If the content type has a custom field named Description, but it is empty, Sitefinity CMS does not add a meta name description.
- If the content type has a custom field named Description and it is filled out, Sitefinity CMS adds meta name description and takes its value from what you have entered in Description field.
Order of displaying meta title and meta description
If on a page you have more than one widget displaying an item in details mode, by default, the page loads the meta title and meta description of the last widget - the widget that is ordered last in the HTML of the page.
You can control whose meta title and meta description to load, by enabling and disabling the SEO properties of the widgets on a particular page.
To do this, in SEOEnabled field, enter true or false, respectively.
EXAMPLE: You have a page displaying a blog post and after the blog post, the page also displays a news item in detailed mode. By default, the meta title and meta description of the News widget will be loaded for this page.
If you want to display the properties of the Blog post widget, in the SEOEnabled field of the News widget, enter false and in the SEOEnabled field of the Blog posts widget, enter true
NOTE: If you want to display the meta title and meta description of the page, where the widgets in detail view are located, you must disable the SEO fields for all widgets on that particular page. This way, the meta fields of the page will be loaded.