Developer forum

Forum » Feature requests » Master Razor include

Master Razor include

Nuno Aguiar
Reply

Hi,

 

To optimize our work we have a series of functions and helpers we need in most/all templates.

 

We then decided to include a generic razor file in all our templates, to ensure we managed all of our functions and helpers in a single place. However we also noticed that performance wise did not do very well, because we ended up loading unecessary functions for some templates. Another problem is that by design Dynamicweb would be loading that include file multiple times for a single pageview (master/page, paragraphs, modules).

 

So my request is to have a master razor include, that Dynamicweb would load as an include in all Razor templates, optimizing the template engine performance, without the frontend developer having to

  • always include in all template OR duplicate due to performance
  • not have to build project specific dll's for it - leave it to templates

 

Best Regards,

Nuno Aguiar


Replies