tags:

views:

97

answers:

1
+1  Q: 

NHAML Directives

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

+1  A: 

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>
Simon