Developer forum

Forum » Templates » Running Razor templates in Dynamicweb 8 costum modules

Running Razor templates in Dynamicweb 8 costum modules

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

We have a Custom Solution running on 8.9.2.22

There are some custom modules running on this solution, that we unfortunately don´t "control". These modules can be atached to paragraphs for rendering content, and they do have a module template "engine", so that we can render the content via a template. But these templates are all HTML. If i place razor templates in the folder, the custom modules don´t recognize these.

Is there a relatively simple way of making an old custom module to run Razor templates, or does this require a big change/update?

/Hans

 


Replies

 
Nicolai Pedersen
Reply

If it uses the Dynamicweb template engine, the template selector just needs to be changed to allow cshtml files.

 
Nicolai Pedersen
Reply

If it uses the Dynamicweb template engine, the template selector just needs to be changed to allow cshtml files.

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Yes,  we got it working selecting the template - but where the old <!--@DwTemplateTags--> outputs what it should in the html template, @TemplateTags() does not output anything from the custom module in the Razor template. Any idea why that could be? Does the module need any reference or something to work in Razor the way it does in HTML ?

/Hans

 

You must be logged in to post in the forum