Skip to content

Instantly share code, notes, and snippets.

@emjayess
Created December 28, 2010 23:25
Show Gist options
  • Save emjayess/757901 to your computer and use it in GitHub Desktop.
Save emjayess/757901 to your computer and use it in GitHub Desktop.
this is going to make my life a little (ok, a lot) easier!...
<cfscript>
// require https://github.com/pmcelhaney/Mustache.cfc
mustache = createobject('component','cfc/mustache');//dump(mustache);
//view template:
hello_templ = '<h1>Hello, {{thing}}</h1>';
//model object:
hello_model = {
thing = 'Mustache'
};
//composition:
writeoutput(
mustache.render(hello_templ, hello_model)
);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment