Module Metatag drupal 7 (7.x-1.22)

En juillet 2017, la version metatag pour drupal 7 est la 7.x-1.22. Il est préférable d'utiliser Imagecache_Token (pour que les réseaux sociaux ne dl pas trop de grosses images).

conf de base

Par hiérarchie => commencer par Global, puis par type d'entité, par bundle ; enfin pour chaque bundle, on peux personnaliser les champs (ex: un produit a une autre image dans une gallerie d'image).

Attention à la méthode de traduction (si site multilingue).

De plus il faut que les entités aient un affichage "token" activé (aller par ex dans admin/structure/types/manage/article/display)

Sélection des entitées dans admin/config/search/metatags/settings

master control for all entities

By enabling and disabling items here, it is possible to control which entities (e.g. nodes, taxonomy terms) and bundles (e.g. content types, vocabularies) will have the meta tag form available on their respective edit pages. If an entity type is disabled it also disables it for all of that entity type's bundles.
Technical note: Entity types must not be configuration entities and must have view modes in order to be compatible.

Custom pager string à  Page PAGER | [current-page:pager] 

When the current page includes a pager, e.g. the URL contains "?page=42", the [current-page:pager] token may be added to a meta tag to differentiate between two pages that would otherwise have the same meta tags. The value "PAGER" (must be in uppercase) will be replaced by the actual page count. Note: the pager will only output if the page number is 2 or above and the string "page=NUMBER" is in the URL.
For best use, it may be worthwhile to add the [current-page:pager] to the page title to the left of the site name, to the start of description tags, etc.

Option des traductions (site multi langue)Internationalization options

voir image
 

Paramètres avancés

Paramètres avancés

  • Sanitize content during token replacement (If checked, will ensure that metatag value output is encoded and text filters are processed.)
  • (optionnel) Allow hreflang tag that matches the x-default tag
    It is recommended to not have hreflang="x-default" and hreflang="SOMELANGCODE" meta tags pointing at the same URL. By default if there is a hreflang="SOMELANGCODE" meta tag with the same URL as the hreflang="x-default" meta tag then the hreflang="SOMELANGCODE" tag will be removed. Checking

conf avancées

On une image (qui existe pour un type de donné précis), on souhaite l'ajouter via le sous module open graph (via un token).

Un ex, avec Imagecache_Token pour charger une image du champs "field_meta_tag_image" en utilisant le style "seo_thumbnail" on peux utiliser les tokens suivants :
[node:field_meta_tag_image:seo_thumbnail:uri]  ou (ils donnent le meme résultat)  [node:field_meta_tag_image:seo_thumbnail]
De plus, pour les dimensions de l'image : largeur [node:field_meta_tag_image:seo_thumbnail:width] et hauteur [node:field_meta_tag_image:seo_thumbnail:height]

 

Internationalization options (metatag 7.x-1.22)
Options avancées (metatag 7.x-1.22)