Overview

Meta tags can be generated into the head section of a page to provide data to search engines and browsers. GenHelm allows you to define site-wide meta tags in the site settings. These site-wide tags can be supplemented and/or overridden at the page level.

Each tag needs to be assigned a type and an identifier.

Meta Tag Type

Below is a summary of the different types of tags that are allowed.

Name

The most important use of a name tag is to provide a suggested description for the page. Here is a sample of a generated Meta Name description tag used by the CNN News website:

<meta name="description" content="View the latest news and breaking news today for U.S., world, weather, entertainment, politics and health at CNN.com.">

To build this tag you would select Meta Tag Type "Name", the Identifier would be set to "description" and the Content field would be assigned "View the latest news and breaking news today for U.S., world, weather, entertainment, politics and health at CNN.com.".

Other common name identifiers include: keywords, google-site-verification, robots and viewport.

Note that some name tags, such as robots, are generated automatically by the system based on other settings specified on the page. So be sure to use your browser's view source feature to check which tags are generated automatically before you introduce a manual tag. Further note that some tags may be generated differently in your sandbox environment. For example, in the sandbox all pages are generally set to noindex so don't assume that you need to override this tag since this will automatically be changed to index in the production environment.

og Property

This type is used to supply Open Graph tags that are used by Facebook and other social media sites to glean information about your page. Here is an example of such a tag:

<meta property="og:type" content="restaurant.menu">

To generate this tag you would select type og Property and specify "type" (without the "og:" prefix) in the identifier column and enter "restaurant.menu" in the content column.

Note that you can generate several og tags automatically using settings provided on the site and page level for this purpose.

og Image Property

Special support is defined for og image property tags such as:

<meta property="og:image" content="https://www.heavydutytarps.com/images/fitted-tarp-with-flap-sm.jpg" />

The first thing to note is that the value to be assigned to the property content should be the id of the image to be shown, not the physical image name. If the image definition contains several images (of different sizes) the most appropriate size will be selected. You can specify a specific size by setting Open Graph Image Size value in the advanced page properties.

The following additional properties will be generated automatically using information contained on the image definition.

<meta property="og:image:width" content="523" /> <meta property="og:image:height" content="288" /> <meta property="og:image:alt" content="Fitted on front, flap on the back" />

The other thing to note about open graph images is that you are allowed to specify several images. This can result in ambiguity when you have defined several open graph images at the site level and you wish to replace or supplement certain images at the page level. To resolve this problem you can suffix the image property with a number when defining them within site settings. For example, the first image could use the standard identifier "image". The next image could use identifier "image2" and the third identifier could be "image3".

This approach will allow you to prepend (add another image before), append (add another image after), clear (remove the site image) or replace any specific image set at the site level with an image designated at the page level. Just make sure the same identifier is used at the page level. For example, if you want to replace the site image having identifier image2 you would define an image at the page level that also has identifier image2 and you would choose merge content "override".

Twitter

Twitter also recommends adding a set of tags to pages that may be referred to in tweets and twitter feeds. Here is an example of a twitter tag:

<meta name="twitter:title" content="CNN - Breaking News, Latest News and Videos">

To generate this tag you would select type Twitter and enter "title" in the identifier column (without the "twitter:" prefix) and enter "CNN - Breaking News, Latest News and Videos" in the Contents column.

Item Property

Item properties are specific to a certain schema. In order to use the Item Property type you must specify a certain schema with the head tag of your page.

http Equiv

Here is an example of an http Equiv tag.

<meta http-equiv="Content-Type" content="text/html">

To specify this tag you would enter "Content-Type" into the identifier column and "text/html" into the Contents column.

Device Specific Tags

Occasionally you may want to generate a different tag contents on phones and other small devices as opposed to what is generated on larger screens. The Device column can be used for this purpose.

Merging Tags

It is possible to define certain tags at the site level (using site_settings) and append to these same tags at the page level. Here are the values that can be entered in the Merge Contents column.

Do Nothing

By default, the metadata entered at the page level will not be used. You must select one of the Merge rules below in order for the page tag to be utilized.

Append

With this option, the content entered at the page level will be added after the contents set at the site level (separated by one space).

Prepend

With this option, the content entered at the page level will be added before the contents set at the site level (separated by one space).

Override

With this option, the contents set at the page level will replace the contents set at the site level.

Clear All

Use this option to indicate that you do not want the site level tag to be generated and it is not to be replaced with alternative page level content.

Help Index

GenHelm Architecture GenHelm Architecure.
Why GenHelm? Summary of the GenHelm methodology.
Getting Started Learn how to start a new website.
Naming Conventions Naming web pages and other items.
Common Web Page Fields Descriptions of fields that are common to all page models.
Layouts Defining codeframes and layouts.
Styles and Scripts Descriptions of fields that are common to all page models.
Meta Tags How to configure meta tags for your site and specific pages.
Dollar Functions General information about dollar functions.
Navigation Tips Navigation Tips and Techniques
Favourite Icons How to configure favorite icons for your site.
Blog Maintenance Blog and post administration.
Direct Command Help Help for the direct command field.
Programming with GenHelm Writing programs that interact with the GenHelm framework.