Skip to content

Instantly share code, notes, and snippets.

@emjayess
Created January 22, 2011 20:11
Show Gist options
  • Save emjayess/791424 to your computer and use it in GitHub Desktop.
Save emjayess/791424 to your computer and use it in GitHub Desktop.
did you ever think coldfusion could achieve such elegance?!
<cfscript>
writeoutput(
stache.render(
$.getTMPL(mustache_path & "navigation.mustache"),
$.getJSON(fixtures_path & "navigation.json")
)
);
</cfscript>
{"navigation" :
[
{
"name" : "Home",
"href" : "/"
},
{
"name" : "About",
"href" : "/about"
},
{
"name" : "Support",
"href" : "/support",
"class" : "help"
}
]
}
<nav class="tabs left">
{{#navigation}}
<a href="{{href}}" class="{{class}}">{{name}}</a>
{{/navigation}}
</nav>
@emjayess
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment