Forum OpenACS Q&A: Is it possible to over-ride the html title tag value in an Xowiki formpage?

On my XoWiki FormPages, by default, the html 'title' tag is populated from the Xowiki default 'Page Title' form field which I believe is mapped directly to the CR '_title' field.

I have an ACS_Category mapped to my xowiki instance to drive a menu tree. The CR '_title' is therefore listed in the menus which is what I want.

However, I need to assign a different field to the html title tag (for SEO purposes) whilst leaving the menus as they are.

What is the best way to pass a replacement title up to the document head in an xowiki formpage to replace the default use of the _title field?

I would like to add a formpage field such as 'pretty_title', and have this go into the html title tag whilst the standard 'Page Title' remains in the menus.

Regards
Richard

Dear Richard, this is a valid and useful request. I have added a small update to xowiki, that uses a form-field with the name "html_title" as HTML title when present. This is similar to the formfield "keywords", which is used for the meta-tag keywords, as it was implemented already before.
Gustaf,

I don't know what to say other thank you so much! :-)

I note that all I need to do to pass my meta keywords is to set a variable @keywords@. I had until now been passing meta keywords using the following idiom:

{{set-parameter keywords {@mykeywords@}}}

I am still using this idiom in my FormPage Template to pass meta description data:

{{set-parameter description {@_description@}}}

Is that the correct way to do it?

Once again, thank you so much for that additional feature.

Regards
Richard

The idiom with set-parameter works on every kind of xowiki page, the approach via form-field just for FormPages, but the latter is more straight-forward, tailorable and extensible. If i would start to write xowiki from scratch, i would just use FormPages for everything. So, if you have a FormPage that has "description" filled out, its value is used as description of the page also without the set-parameter in the template.
Ah, brilliant. Thank you for clarifying that.

Once again, thank you very much.

Regards
Richard