Developer forum

Forum » Development » Accessing Page Template from a NotificationSubscriber

Accessing Page Template from a NotificationSubscriber


Reply
Hi there,

This one is similar to my previous post but deals with page templates, not paragraph templates. What's the best way to set paragraph tags for a page template in a NotificationSubscriber? Currently, I do something like this:

PageView myPageView = PageView.Current();
myPageView.TemplatePage.SetTemplateValue(tagKey, "true");

That works, but feels a bit clumsy as TemplatePage is not a V2 version of Template and SetTemplateValue feels old.

Are there better alternatives?

Thanks,

Imar

Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Unfortunately not. All paragraph and page templates used in frontend (that is templates that are available through the PageView object) are Dynamicweb.Template objects and not Dynamicweb.Templatev2.Template objects.
 
Reply
OK, thanks for that.

Imar

 

You must be logged in to post in the forum