Forum OpenACS Development: Re: template::head::add_meta in XoWiki

Collapse
Posted by Gustaf Neumann on
Dennis, my understanding was that you wanted to change some default values of some meta tags from "templating" from within an xowiki page, while Torben recommendation was how to turn off the minimal setting of meta tags that xowiki does.

If i am right with my assumption, i can give you an explanation of what's going on. The question, which add_meta calls are effective are a matter of evaluation order. XoWiki renders the page, before the rendered output is passed to templating (the rendering code might influence, what templates are going to be used). So, if you set meta-tags from within xowiki, these can be easily overwritten by some surrounding templating code. So, the surrounding templating code should be defensive in not overwriting blindly the meta-tags. This is exactly what Torben's code does.

If you want to set keywords on a per-page basis in xowiki, you can do it e.g. via {{set-parameter keywords "XoWiki Wiki Documentation Handbook"}} as it is done on: http://alice.wu-wien.ac.at:8000/xowiki-doc/ . If you want to set the keywords on a per package instance basis, you could add a package parameter "keywords" and set it appropriately.

Hope this helps
-gustaf neumann

Collapse
Posted by Dennis Lima on
Bingo!

Works like a charm. Our content editors now have control of the meta keywords.
Thanks for your help.

(You too, Torben)