I'm starting to make heavy use of T4MVCs "links" feature (eg, @Links.Content.Site_css). Does anyone know if there's a way to generate methods for files that are stored in folders within areas? I've tried making the following modification to the settings file, but haven't had any luck.
// Folders containing static files for which links are generated (e.g. Links.Scripts.Map_js)
readonly string[] StaticFilesFolders = new string[] {
"Scripts",
"Content",
"Areas/Admin/Content"
};
Thanks very much in advance.
DS
Instead of
"Areas/Admin/Content"
Try using:
@"Areas\Admin\Content"
I think this will do it.
I didn't end up needing to alter T4MVC.TT at all. Adding "Areas" to the StaticFilesFolders in T4MVC.TT.settings.T4 did the trick.
// Folders containing static files for which links are generated (e.g. Links.Scripts.Map_js)
readonly string[] StaticFilesFolders = new string[] {
"Scripts",
"Content",
"Areas"
};
Thanks for your help David. :-)
PS - using T4MVC Version 2.6.64
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With