nhaml

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 that other pages can have specific CSS and JavaScript files. In Rails, this is done util...

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 Podwysocki using ASP.NET MVC, NHaml, and F#! ...

NHaml configuration problem: Model is not found

Hello. I'm having a little problem with my NHaml config: <configSections> <section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/> </configSections> <nhaml AutoRecompile="true"> <assemblies> <add assembly="Microsoft.Web.Mvc"/> <add assembly="MyAssembly"/> </assemblies> <namespaces> <add ...

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 plugin adds support to the IDE for editing NHaml files, but basically only adds syntax h...

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! ...

NHAML Directives

Does anyone know how to use directives (ex. @ Import) with NHAML? ...

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 actively? If anyone can point me to the centre of activity for NHaml or at least let me ...

ASP.NET MVC - NHaml issue on web.config file

Hello There, I'm trying to implement NHaml views on my application, and it's all working well. But strangely I'm getting some warnings on web.config files when publishing the application. My nhaml parameters are: <configSections> ... <section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/> </configSection...

add output of %link directive to variable?

In my master a partial _styles is loaded. In this _styles there is a ^var styles = "" Now in all my views or partials I can say var styles = styles+"another style" Normally a style is defined as %link{ href="../../content/css/partial.css" rel="stylesheet" type="text/css" } How can I append the output of the %link directive to the st...

Why are my script tags rendered outside my body tag?

This is my nhaml code ^ var title="" !!! XML !!! Strict %html{xmlns="http://www.w3.org/1999/xhtml"} %head %title Nhaml Master #{title} _styles %body .page %h1 = "hello world" _ _scripts The resulting HTML renders the last tags as such: </div> </body> <script src="http://ajax....

Create an incremental placeholder in NHaml

What I want to reach is a way to add a script and style placeholder in my master. They will include my initial site.css and jquery.js files. Each haml page or partial can then add their own required files to those placeholders. Currently I'm creating two strings in my master that I append to in my views. This results in an ugly and erro...

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? ...

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)? ...

Error when specifying tag attributes in NHaml

I am just getting started with NHaml and ran into a snag. This is my application.haml file: %html %head %title = Get Some Data %link{ href="/media/css/styles.css", rel="Stylesheet", type="text/css" } %body %div.page %h1 = Get Some Data _ When I try to view in a browser it throw the following error: NHa...

Specificying a Page directive attribute on an NHaml page

I am working on an MVC site using NHaml for the view engine. I have a page that needs to submit HTML code as a form value and am getting the System.Web.HttpRequestValidationException thrown at me. I want to specify the <%@ Page validateRequest="false" %> so that this page will allow this data to be submitted but am unsure on how to do ...

Missing extension methods in HtmlHelper using NHaml

Hi, 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 'LabelFor' and no extension method 'LabelFor' accepting a first argument of type 'Sys...

Assembly references in Nhaml

I'm trying to get Nhaml working for an ASP.NET MVC 2 project. The backend of the project is Mongo DB, using the NoRM driver. NoRM specifies some custom types, particularly ObjectID as a reference to Mongo's unique _id column. I've got the Nhaml views compiling and outputting data from a strongly typed model, but it's choking on the Obje...

NHaml T4 templates for CRUD?

Hello, I want to ask if anyone have or seen T4 templates for NHaml that are same as default T4 CRUD (List, Create etc) templates from MVC 2.0? Thanks for any source :) ...

Can I use the nHaml code base to convert haml files to HTML to offer a ajax preview of HTML generated?

I have a requirement for a preview of generated html from Haml entered in to a text area. I need to be able to show the generated HTML to a user entering haml in to a text area using Ajax to call a server back end. Can / How do I take a string of haml and parse it to HTML using nHaml? ...