Tuesday, May 3, 2011

NHAML Directives

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

From stackoverflow
  • if you mean adding references and importing namespaces you do it in the app.config or web.config

    <?xml version="1.0"?>
    
    <configuration>
    
      <configSections>
        <section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/>
      </configSections>
    
      <nhaml autoRecompile="true">
        <assemblies>
          <add assembly="NHaml.Samples.Mvc"/>
        </assemblies>
        <namespaces>
          <add namespace="NHaml.Web.Mvc"/>
          <add namespace="NHaml.Samples.Mvc.Controllers"/>
        </namespaces>
      </nhaml>
    
    ...
    
    </configuration>
    

0 comments:

Post a Comment