Developer forum

Forum » Development » Creating a true global tag

Creating a true global tag

Martin Nielsen
Reply
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

Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
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


 
Martin Nielsen
Reply

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 Dynamicweb Employee
Imar Spaanjaars
Reply
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

 

You must be logged in to post in the forum