Developer forum

Forum » Templates » Out commented TemplateTags in Razor

Out commented TemplateTags in Razor

Anders Ebdrup
Reply

Hi Dw,

 

When have out commented TemplateTags like:

@* @TemplateTags() *@

 

I a razor template, it seems like the TemplateTags are parsed anyway on the server side (tested on 8.5.1.x) and are causing longer load time.

 

It would be nice that the out commenting code blocks works as expected.

 

Best regards, Anders


Replies

 
Mikkel Ricky
Reply

I agree, but due to the way our template engine works this will be very hard to implement (basically our template engine must parse the Razor templates). Therefore, we have to live with this minor annoyance for now. 

In my personal opinion @TemplateTags (and <!--@DwTemplateTags--> for that matter) is something you put into your template, read the output and then remove again. Not something that you leave in the template.

Best regards,
Mikkel

 
Anders Ebdrup
Reply

Hi Mikkel,

 

I agree, but still I think it should be a work item for Dynamicweb to fix this as it can really slowdown performance without knowing why :-)

 

Best regards, Anders

 

You must be logged in to post in the forum