rip747 / Mustache.cfc

{{ mustache }} for ColdFusion
http://mustache.github.com/
MIT License
46 stars 22 forks source link

Custom Tag version #3

Closed seancoyne closed 12 years ago

seancoyne commented 12 years ago

I have created a custom tag version so you can render templates like:

<cfset context = {
    name = "Patrick",
    value = 1000,
    in_ca = true,
    taxed_value = 600
} />

<cfimport taglib="/path/to/mustache/dir" prefix="stache" />
<stache:mustache context="#context#">
<cfoutput>
Hello {{name}}
You have just won ${{value}}!
{{##in_ca}}
Well, ${{taxed_value}}, after taxes.
{{/in_ca}}
</cfoutput>
</stache:mustache>

I updated the readme and provided a unit test.

rip747 commented 12 years ago

thank you so much! this is an excellent feature