Problem

You want to set the content of a HTML meta tag inside a Handler.

Solution

Use the toWidgetHead function to pass in tags. For instance to add the description meta-tag:

toWidgetHead([hamlet|<meta name=description content=#{description}>|])

Discussion

We use a hamlet widget to add the whole tag with its HTML. Please be careful not to call this function multiple times since it will add the same tag again, no matter if its already set or not.

If you would also like to set the title of a page, have a look here: Setting the Page Title