Meta Tag Inheritance and More

One of the things that makes meta tags so powerful and versatile is that there is a system of inheritance when you create meta tags. It's important to understand the basics of this when working with meta tags in your project.

Meta Tag Inheritance Chain

Meta tag settings can start in a meta tag set file (if you create one) and work their way down to lower level content, with files inheriting the tags and values along the way. This allows you to single-source content as much as possible, rather than having to set the same meta tags and values manually in many locations.

If you override the meta tag value at a certain file level, that new value might then be inherited by other file types below it in the hierarchy. However, this is not always the case. Also, some types of files might inherit meta tag values but not pass them on to other files (see Meta Tag Inheritance Table). And then there are snippets, which are somewhat unique due to their nature (see Meta Tags and Snippets).

The basic inheritance chain for web-based outputs is as follows.

Example In the meta tag set file, you have created a text meta tag as follows.

If you open the properties for any of the file types mentioned above, you'll see this same meta tag and its value, along with text indicating it is coming from the meta tag set file.

You might decide to open the properties for a template page and override the value for that meta tag.

If you look at the properties for a topic that is associated with that template page, you will see that the value is now inherited from the template page instead of the meta tag set file, along with a message indicating this.

Note Inheritance is useful when output is generated. For example, if certain meta tag values are set on a template page, all topics using that template page will automatically show that meta tag value in the output (e.g., when viewing the page source).

However, inheritance does not really come into play with content management in source files. If you wanted to find all of the files using a particular meta tag, only files where the meta tag was explicitly set would be part of that collection of information. Say you set a meta tag value on a template page but not explicitly on any topics. If you were to open the Used Meta Tags window pane (via the Analysis ribbon), you would see the template page listed but not the topics that are associated with that template page.

Note PDF and Word outputs do not use meta tags from content files, so the chain of inheritance in that case is as follows.

Note Although you can add meta tags to images and multimedia files, they do not inherit values from other files. See Meta Tags for Images and Multimedia.

Meta Tags and Targets

It's possible to set different values for the same meta tag in multiple targets. That is why, once you open the properties for a file below the target level, you will see a drop-down letting you choose a target. This lets you see the value that will be used for a specific target.

In addition, when you look at the Meta Tags tab in the Target Editor, you will see a couple of options unique to targets:

  • Include in output This simply lets you control whether you want meta tags to be part of the generated output. Usually, you will want this enabled, but just in case you want to exclude meta tags from the output, you can disable this option.

  • Override values set in content files When this option is enabled:

    • If "Set to value" is selected, the explicit value in the target will be used, regardless of what value might be set on content files.

    • If "Not set" is selected, the explicit value in content files will be used.

Meta Tags for Micro Content Files and Phrases

A micro content file and its phrases can inherit a meta tag value from a meta tag set, project, or target. It does not inherit values from template pages or topics. If you set a meta tag value in the properties for a micro content file, the micro content phrases will inherit that value.

Meta Tags and Snippets

You can also set meta tags on snippet files. A snippet can inherit a meta tag value from a meta tag set, project, or target.

If you set the value for a meta tag in a snippet's properties, it is possible that a related topic could derive that value, which is different than inheritance. A topic could contain multiple snippets that have different values for the same meta tag.

In a case such as this, when you look at the page source in the output, the topic will include each of those values.

However, if you manually set the value for the meta tag in the topic's properties, it will use that instead.

Meta Tags for Images and Multimedia

Unlike the other file types, there is no inheritance with meta tags on images and multimedia files, such as videos.

Also, meta tags on these types of files are not used in the output. Instead, they are used only for content management purposes (see Meta Tags and Content Management).

Meta Tag Inheritance Table

This illustrates which files inherit meta tag values from other files.

 

Meta Tag Value Added To…

 

Meta Tag Set File

Project

Target

Template Page

Topic

Micro Content File

Inherited by Project?

Yes

 

 

 

 

 

Inherited by Target?

Yes

Yes

 

 

 

 

Inherited by Template Page?

Yes

Yes

Yes

 

 

 

Inherited by Topic?

Yes

Yes

Yes

Yes

 

 

Inherited by Micro Content File?

Yes

Yes

Yes

No

No

 

Inherited by Micro Content Phrase?

Yes

Yes

Yes

No

Maybe1

Yes

Inherited by Snippet?

Yes

Yes

Yes

No

No

No

Inherited by Image?

No

No

No

No

No

No

Inherited by Multimedia File?

No

No

No

No

No

No

1If a micro content phrase is linked to a topic, the phrase will inherit meta tag values from that topic. Otherwise, it will not inherit those meta tag values.