Posted on 25/07/2008 16:09:52
Hey Thomas,
Thanks, I have allthough found a workaround/hack, not exactly what I would call supported way to do what should be pretty straight forward with minor changes from DW in the standard, so I also would like to hear from DW, why they are not supporting the "Standard Page After Render" notification, as I only see the Page.Loaded and Page.Title types of subscription.
But here is the code, so you might be able to accomplish the same:
[Subscribe("DWN_STANDART_PAGE_AFTER_RENDER")]
public class GlobalMenu : NotificationSubscriber
{
public override void OnNotify(string notification, object[] args)
{
base.OnNotify(notification, args);
if (args.Length > 0)
{
Dynamicweb.Templatev2.Template globalTemplate = args[0] as Dynamicweb.Templatev2.Template;
if (globalTemplate != null)
{
globalTemplate.SetTag("tagname", "my value");
}
}
}
}
/René
Argh sorry for the changes to this post (copy/paste to this forum with formating just seems to be a bit strange to say the least).