Questions tagged [nhaml]

NHaml is a .NET implementation of the popular Rails Haml view engine.

24 questions
26
votes
3 answers

NHaml T4 templates for CRUD?

I want to ask if anyone has or has seen T4 templates for NHaml that are the same as the default T4 CRUD (List, Create etc) templates from MVC 2.0?
Łukasz W.
  • 9,538
  • 5
  • 38
  • 63
9
votes
4 answers

Visual Studio Language Service with C# intellisense

Last year I wrote a Language Service for Visual Studio which added syntax highlighting for NHaml files: http://github.com/snappycode/hamleditor. To clarify, NHaml is a html template language that can mix in code elements like an aspx file can. This…
whatupdave
  • 3,124
  • 5
  • 28
  • 32
5
votes
2 answers

Should I Learn NHaml?

Should I learn NHaml? What does it provide me over a classic ASP.NET MVC view? What are the pros and cons? Are you using it via the MVC Contrib project? I have been seeing more and more about it. For example... I saw a blog post by Matthew…
Elijah Manor
  • 17,923
  • 17
  • 72
  • 79
5
votes
2 answers

Does NHaml have a content_for ability for layouts?

I am currently starting a project utilizing ASP.NET MVC and would like to use NHaml as my view engine as I love Haml from Rails/Merb. The main issue I face is the laying out of my pages. In Webforms, I would place a ContentPlaceHolder in the head so…
Kevin Faustino
  • 143
  • 1
  • 6
4
votes
2 answers

Can NHaml be used as a general purpose template engine? (outside of MVC)

I've seen a lot of people that like using the NHaml View Engine in ASP.NET MVC, but I'm wondering if NHaml can be used as a general purpose templating engine in .NET ? I'd like to use NHaml from a Console application, or to generate HTML email…
Kevin Southworth
  • 373
  • 2
  • 11
4
votes
3 answers

NHaml - still active?

I accidentally stumbled across NHaml and really like what I have seen of it. However, checking the blogs of the authors and Google group reveals that there doesn't seem to be much happening. Is it worth investing time in NHaml - is it going forward…
geester
4
votes
0 answers

ASPX View Engine

So the Razor view engine is open source and can be used outside MVC specific implimentations. However, for my specific project (Where I want to enable this functionality inside WordprocessingML Razor won't work as it tries to be smart and work out…
Gineer
  • 2,358
  • 4
  • 26
  • 40
2
votes
3 answers

Missing extension methods in HtmlHelper using NHaml

I discovered NHaml some days ago and it's a great project. When I try to use MVC2 Html helpers like Html.LabelFor(), Html.TextBoxFor(); the views won't compile. Example: error CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for…
SandRock
  • 5,276
  • 3
  • 30
  • 49
2
votes
1 answer

How to use NHaml in MVC 4?

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:…
1
vote
1 answer

NHAML Directives

Does anyone know how to use directives (ex. @ Import) with NHAML?
Rich Blumer
  • 960
  • 1
  • 15
  • 26
1
vote
3 answers

NHAML Radio Button Syntax

Does anyone know the correct syntax for a selected radio button in NHAML? This is my current NHAML code: %input{type="radio", name="Relocation", value="Yes"} The help would be greatly appreciated. Thanks!
JustAnotherDeveloper
1
vote
1 answer

Is it possible to use different view engines for different views in the *same* ASP.NET MVC website?

I'd like to experiment with NHaml. Can I use the NHaml view engine for a few of my views, without having to convert the entire application (or create a new prototype application)?
Ben Aston
  • 53,718
  • 65
  • 205
  • 331
1
vote
3 answers

Strongly typed views in NHaml?

I have a strongly typed view and want to use it in an NHaml page. With the WebForms engine I would describe the ViewData type in the <%@ Page%> directive or in the codebehind file. How would I go about that in NHaml?
Boris Callens
  • 90,659
  • 85
  • 207
  • 305
0
votes
2 answers

Does NHAML require ASP.NET MVC?

Couldn't find this directly on the NHAML project page, so i was wondering if you need to run the ASP.NET MVC in order to use NHaml or if I can use this on a "normal" ASP.NET webpage? Also, i've read that you'd need to intercept requests for Sass and…
codingbunny
  • 3,989
  • 6
  • 29
  • 54
0
votes
1 answer

NHaml configuration problem: Model is not found

I'm having a little problem with my NHaml config:
Gonzalo Quero
  • 3,303
  • 18
  • 23
1
2