Summary: A way to merge multiple meta tags into single entries
Version: 0.1 (23 January 2006)
Prerequisites: Probably requires at least PmWiki version: 2.0; last tested on PmWiki version: 2.1.beta22
Categories: Obsolete


Multiple (:keywords:) and (:description:) directives generate multiple <meta> tags in the HTML, is there a way to merge them into single entries?


This recipe is obsolete, equivalent functionality is provided by the PmWiki core from version 2.1.beta37 onwards.

It is possible with mergemetatags.phpΔ.


Why would I have multiple (:keywords:) or (:description:) in my pages?

It would be useful, for example, to place in a GroupHeader the keywords and description that are common to the whole group, and in every page the keywords and description which are specific for that page.

Why is it useful to merge the meta tags?

It is useful, or even necessary, to have single meta tags entries in the final HTML because most search engines will ignore multiple meta tags with the same name, or even detect it as a spamming technique.


Download the script from above and place it in your cookbook directory. Then add include_once('cookbook/mergemetatags.php'); in your local configuration (local/config.php).


No configuration is necessary. Just install it and it will work automatically.


The script will work automatically without any change in the wiki markup. Any occurrence of multiple (:keywords:) or (:description:) in the same rendered page will be merged in the final HTML.


The recipe will internally include the script stdmarkup.php, so in your local config.php anything that should be before (or after) stdmarkup.php place it before (or after) the MergeMetaTags recipe.

If for example your site needs utf-8 you have to include the script xlpage-utf-8.php before including mergemetatags.php recipe script.


  • 0.1 - 23.01.2006
    • First implementation.


See Also


User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.