I made a menucard module that creates a page which lists a category. F.e 'appetizers' with f.e 10 items in it. All items reference (with node reference) to the 'container' which is 'appetizers' . Appetizers itself is a node which has a description field. I need this value to be the metatag of this page.

The list is not made in Views. But with my own theme function.
I do know how get the value of the field to use as the metatag.
I do know hook_page_alter.

So the question is: How do I create/insert the metatags 'on the fly' when the page is viewed.

Comments

fenix_75’s picture

Ok. I decided to make use of:

http://drupal.org/node/1151926#comment-5470080

It's a code snippet that allows me to use drupal_add_html_head to add (meta)tags to the head of a document. This solution works very well for me so this issue can be closed.

damienmckenna’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of #1308164: Documentation Please!, which is where we'll work on the documentation.