T4MVC support for static files in areas?

I am starting to actively use the T4MVC โ€œlinksโ€ function (for example, @ Links.Content.Site_css). Does anyone know if there is a way to generate methods for files that are stored in folders inside areas? I tried to make the following changes to the settings file, but no luck.

// Folders containing static files for which links are generated (eg Links.Scripts.Map_js) readonly string[] StaticFilesFolders = new string[] { "Scripts", "Content", "Areas/Admin/Content" }; 

Thank you very well in advance.

DS

+4
source share
2 answers

I did not have to change T4MVC.TT at all. Adding "Scopes" to StaticFilesFolders in T4MVC.TT.settings.T4 did the trick.

 // Folders containing static files for which links are generated (eg Links.Scripts.Map_js) readonly string[] StaticFilesFolders = new string[] { "Scripts", "Content", "Areas" }; 

Thanks for David's help. :-)

PS - using version T4MVC version 2.6.64

+3
source

Instead

 "Areas/Admin/Content" 

Try using:

 @"Areas\Admin\Content" 

I think it will be done.

+5
source

All Articles