Heres a thing... Ive been using Custom Tags to create output at page level using [Dynamicweb.Extensibility.Subscribe(Dynamicweb.Notifications.Standard.Page.AfterOutput)] and OnOutput
All is good, and I can set some Paragraph tags at the Para level too - Dynamicweb.Notifications.Standard.Paragraph.OnBeforeRender
Now I want to set some page level content dependent on a Paragraph output.
Im using the NewsV2 module on a Para and trying to create a News Headlines "Navigation" Menu in a sidebar on a page.
The Page Template is generic used all over the site but I could render this conditionally if a news module is attached to a Para on the page and I can set a custom tag If Defined... in the Page
// Set a Custom tag in the page that hosts a specific Custom Module in a Paragraph
if (paragraph.ParagraphModuleSystemName.ToString() == "NewsV2")
Then I go off and get some content from some settings on the module and add Tags to my tagCollection - all good so far
So now I have my tag set at Para level and the values I want. The trick is to get this added to [Dynamicweb.Extensibility.Subscribe(Dynamicweb.Notifications.Standard.Page.AfterOutput)] or OnOutput routines
I thought I could:
Dynamicweb.Notifications.Standard.Page.OnOutputArgs args = new Dynamicweb.Notifications.Standard.Page.OnOutputArgs;
args.template.Tags.Add(tagCollection);
But no not possible. There must be way to add some Para Tags to Page Tags?