Developer forum

Forum » Feature requests » Tag to add content to HEAD section

Tag to add content to HEAD section

Sten Hougaard
Reply
Sometimes you need to add content to the HEAD section from the content area. Think of the scenaria where you have someone wanting to share your webpage through facebook. Facebook will look for special meta data elements like this:

<meta property="og:title" content="100 Photos! & House Constructions"/>
<meta property="og:site_name" content="http://www.blah.net"/>
<meta property="og:type" content="article"/>

If a person wants to share a single news item, the title is not the title of the page but the title of the news item. So you might have a tag like this:
<!--@AddToHead('<meta property="og:title" content="<!--@News:Heading-->" />')-->

Any suggestions? :-)

/sten

Replies

 
Nuno Aguiar
Reply
Hi Sten,

It's been suggested. Check it out:
http://developer.dynamicweb-cms.com/forum/feature-requests/facebook--ecommerce---opengraph-tags.aspx?PID=48

Nuno

 
Sten Hougaard
Reply
 Hi Nuno,
Thanks for remembering this! Now all we need is for someone at Dynamicweb to decide what they want to implement on the thread you mentioned above. As I read on it there is no conclusion as of what they will do :-)

/Sten
 
Hans Ravnsfjall
Reply

Hi - this is an old thread, but is there any solution for this as of now?

 
Morten Bengtson
Reply

You can use snippets to move content from one template to another at render time.

Here is an example.