MVC Help View Razor
My passion for .tt files is great . T4MVC is the best example of what you can achieve with .tt files in MVC .
Now, the problem: For each project you have a help file must be created. I mostly work with ASP.NET MVC projects – so I frequently have this problem.
I have then created a .tt file that generates summary help .cshtml Razor files for each View that you have in an ASP.NET MVC project. This .t t file generates for you the folder structure (including Areas ) for having a view help file for each view that you have in the project.
More, if the help file already exists in the project, it will be not overwritten.
The template can be customized:
-the folder name:
//change here the location folder where the help files will be generated
static string HelperFolderName="Help";
-the content of the file
//change here the default content of the file
string TextFile = "<html><body>This is the help file for the view {0}</body></html>";
(For improvements please create an issue on github)
See demo at http://youtu.be/ZGsNHyFA9yw
You can download from https://github.com/ignatandrei/RazorHelpFile/
Use the help file with
<a href=’@Url.Content("~/Help/Views/Home/Index.cshtml")’ target="_blank">Index Help</a>
Enjoy!