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:

  1. Open the page where the widget that you want to configure is located.
  2. Open the widget designer, by clicking Edit.
    This must be an MVC widget.
  3. Navigate to the advanced properties, by clicking Advanced.
  4. Click MetadataFields.
  5. 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.
  6. 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.
  7. In PageTitleMode, enter one of the following:
    • Replace
      This is the default value. The page title is replaced by the item's title.
    • Append 
      The item title is appended to the page title.
    • Hierarchy 
      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.
  8. In SEOEnabled, enter true
    This setting enables and disables the meta title and meta description fields of the particular widget.
  9. 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. 

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?