Developer forum

Forum » Development » Manipulate pageview.Output()

Manipulate pageview.Output()


Reply

I've been toying with the for some time now. All our old custommodules(CM) are compiled into custommodules.dll.

 

I'm trying to fix this so each modul is in its own module. And everything was going fine, untill i ran into one of our more special moduls that changes the Pageview on default.cs.

 

like this: (I've simplified it to save space):

from default.cs

// Hooking end 
   
//Initialize the pageview and load data
Pageview.Load();
   
//DM --- Insert module if template tag is found

...

Pageview.TemplatePage.SetTemplateValue('TagName', 'text');

 

This changes a TagName to some text on every page.

 

Is there a way to add this functionality without changing the code in default.cs.

I'm thinking an event/method of somekind we can grab from a seprate dll every time the default.cs fires Page_Load or the pageview runes .Load();

 

Thanks in advance.

KimS


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Kim

 

Take a look at 7850_(en-US)_Extensibility_API__Dynamicweb_eCommerce.pdf on http://documentation.dynamicweb.dk/Development-23323.aspx - it mentions a page template extender on page 18.

 

 

Here is some sample code:

 

Public Class SamplePageTemplateExtender

Inherits PageTemplateExtender

Public Overrides Sub RenderTemplate(ByVal Template As

Templatev2.Template)

..............

End Sub

End Class

 

You must be logged in to post in the forum