T4MVC 支持区域中的静态文件吗?
我开始大量使用 T4MVC 的“链接”功能(例如,@Links.Content.Site_css)。有谁知道是否有办法为存储在区域内文件夹中的文件生成方法?我尝试对设置文件进行以下修改,但没有成功。
// 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"
};
预先非常感谢。
DS
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
而不是
尝试使用:
我认为这可以做到。
Instead of
Try using:
I think this will do it.
我最终根本不需要更改 T4MVC.TT。将“区域”添加到 T4MVC.TT.settings.T4 中的 StaticFilesFolders 中就可以了。
感谢你的帮助大卫。 :-)
PS - 使用 T4MVC 版本 2.6.64
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.
Thanks for your help David. :-)
PS - using T4MVC Version 2.6.64