4

我开始大量使用 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

4

2 回答 2

5

代替

"Areas/Admin/Content"

尝试使用:

@"Areas\Admin\Content"

认为这会做到。

于 2011-10-24T06:43:09.137 回答
3

我最终根本不需要改变 T4MVC.TT。将“区域”添加到 T4MVC.TT.settings.T4 中的 StaticFilesFolders 就可以了。

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

感谢您的帮助大卫。:-)

PS - 使用 T4MVC 版本 2.6.64

于 2011-10-26T03:57:45.480 回答