Hi guys,
I've been reading around the forum looking for a way to create a true global tag, ie. a tag that is in ALL my templates, from page to news over ecom to paragraph templates.
So far this thread made the most sense, but the code only adds the tag to the page template: http://developer.dynamicweb-cms.com/forum.aspx?PID=48&ThreadID=24486
Can someone tell me if it's possible, and where i might find a working snippet for it?
Regards
Martin
Developer forum
E-mail notifications
Creating a true global tag
Martin Nielsen
Posted on 17/02/2012 08:42:43
Replies
Imar Spaanjaars
Posted on 17/02/2012 09:44:34
Hi Martin,
Both OnGlobalTags as well as AfterOutput would add tags that show up in, say a news template, or a paragraph template. Are you seeing different behavior?
Attached you find an example of both subscribers.
Hope this helps,
Imar
Both OnGlobalTags as well as AfterOutput would add tags that show up in, say a news template, or a paragraph template. Are you seeing different behavior?
Attached you find an example of both subscribers.
Hope this helps,
Imar
Martin Nielsen
Posted on 17/02/2012 10:10:52
I thought i saw different behaviour, but after taking a closer look it's been working all along.
Thank you for the snippets, i'll be sure to keep them somewhere close for when i need it next time :-)
// Martin
Imar Spaanjaars
Posted on 17/02/2012 10:14:22
You're welcome. Do you have the Visual Studio templates for Dynamicweb installed? With those templates, writing this code is almost as simple as adding a new file to your project: http://developer.dynamicweb-cms.com/documentation/for-developers/visual-studio-templates.aspx
Cheers,
Imar
Cheers,
Imar
You must be logged in to post in the forum