emjayess
1/22/2011 - 8:11 PM

did you ever think coldfusion could achieve such elegance?!

did you ever think coldfusion could achieve such elegance?!

<nav class="tabs left">
{{#navigation}}
  <a href="{{href}}" class="{{class}}">{{name}}</a>
{{/navigation}}
</nav>
{"navigation" :
  [
    {
      "name" : "Home",
      "href" : "/"
    },
    {
      "name" : "About",
      "href" : "/about"
    },
    {
      "name" : "Support",
      "href" : "/support",
      "class" : "help"
    }
  ]
}
<cfscript>
writeoutput(
  stache.render(
    $.getTMPL(mustache_path & "navigation.mustache"),
    $.getJSON(fixtures_path & "navigation.json")
  )
);
</cfscript>