2

I have used haml in Ruby on Rails, and I found a haml version in .Net called NHaml, I am tired to search how to implement NHaml in a web application, I read this article: http://weblogs.asp.net/stephenwalther/asp-net-mvc-tip-35-use-the-nhaml-view-engine but I can't complete the steps because I have an error with this line

ControllerBuilder.Current.SetControllerFactory(new NHamlControllerFactory());

I think that the tutorial is for a old version, I need to use Html in MVC 4, really I don't know if the project is dead, because the information that I found is of 2011, 2010, 2009...

Viktor Justo
  • 203
  • 2
  • 9

1 Answers1

3

Remove any old versions you have and install this one:

https://github.com/NHaml/NHaml

Then, add this line:

ViewEngines.Engines.Add(new NHaml.Web.Mvc3.NHamlMvcViewEngine())
barak manos
  • 29,648
  • 10
  • 62
  • 114
  • Instead of downloading from GitHub, you could also install the [System.Web.NHaml.Mvc3 NuGet package](https://www.nuget.org/packages/System.Web.NHaml.Mvc3/). – Scott Jan 08 '18 at 20:24