Skip to content

Meta Fields

patrickdemooij9 edited this page Jan 14, 2022 · 3 revisions

Meta Fields

Installation

If you want to use Meta Fields for your Umbraco project then these are the steps to install the package:

  1. You first want to download the NuGet package to your project. You can use dotnet add package SimpleRedirects to download the NuGet package. Make sure to build your project after that!
  2. In your _ViewImports.cshtml, you want to add the following line @addTagHelper *, uSeoToolkit.Umbraco.MetaFields.Core.
  3. Wherever you want to render your fields, add the following tag <meta-fields></meta-fields>. This will most likely be inside the master template.

You are all ready to go now!

Getting Started

Meta Fields are quite easy to configure. You can go to any document type and add the specific document type settings to it. If you go to a document type, you'll notice a new tab called "Seo Settings". When clicking on this tab, you'll see an option to enable the SEO settings for this document type.

By enabling this and saving, it'll add an SEO tab to each content node of the given document type. This now allows users to add content for the following fields:

  • Title
  • Meta Description
  • Open Graph Title
  • Open Graph Description
  • Open Graph Image
  • Canonical Url

However, you are also able to select the default output of those fields on a document type. When clicking on "Open Settings" within the Document Type, you can select the fields that should be used for the output. For example, if the following fields are chosen "productTitle" & "seoTitle", it'll first check the value of "productTitle". If that value is empty, it'll continue with the "seoTitle".

Inheritance

You are also able to inherit document type settings from another document type. By clicking "Select Inheritance", you can choose another document type that has SEO settings enabled. It'll then use the settings from that other document type. You do have the ability to override those settings and to use the inherited value in your settings.

Adding your own fields.

TODO: Add how to do this!

Clone this wiki locally