rip747 / Mustache.cfc

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

basic extends template functionality #21

Open garyhiscox opened 11 years ago

garyhiscox commented 11 years ago

Hi Tony,

I have branched the extends functionality and added a MXUnit test - extendsTemplate()

Gary

dswitzer commented 11 years ago

I didn't think extends was part of the Mustache spec. Did they add it recently?

garyhiscox commented 11 years ago

http://stackoverflow.com/questions/7925931/can-mustache-templates-do-template-extension

Currently mustache.java, hogan.js and phly_mustache support template inheritance. https://github.com/mustache/spec/issues/38

On 20 December 2012 12:58, Dan G. Switzer, II notifications@github.comwrote:

I didn't think extends was part of the Mustache spec. Did they add it recently?

— Reply to this email directly or view it on GitHubhttps://github.com/rip747/Mustache.cfc/pull/21#issuecomment-11572451.

dswitzer commented 11 years ago

I read all those threads before posting, but it's never been officially added to the language from what I can see.

Since we've been trying to keep Mustache.cfc to support what's in the official spec, what I'd do is create a sub-class of Mustache and add the functionality to that component--which should be fairly straightforward.

That way we expose the functionality for those that want it and if it becomes official, we push into into the base Mustache.cfc.

Does that make sense?

rip747 commented 11 years ago

what is the status of this? are we going to merge it?

dswitzer commented 11 years ago

It's not actually part of the official spec as far as I can tell, but there are implementations that support it. Seems like the best option would be to sub-class Mustache.cfc and include that in the build. That way we have the feature for those that need it, but don't have it in the base class.

On Thursday, January 3, 2013, Anthony Petruzzi wrote:

what is the status of this? are we going to merge it?

— Reply to this email directly or view it on GitHubhttps://github.com/rip747/Mustache.cfc/pull/21#issuecomment-11868052.

Dan G. Switzer, II dswitzer@pengoworks.com http://blog.pengoworks.com/

rip747 commented 11 years ago

that's an excellent idea.

garyhiscox commented 11 years ago

That sounds like a good plan, Time is limited at the moment, I will rework the code into a sub-class as soon as possible.

On 4 January 2013 02:07, Anthony Petruzzi notifications@github.com wrote:

that's an excellent idea.

— Reply to this email directly or view it on GitHubhttps://github.com/rip747/Mustache.cfc/pull/21#issuecomment-11869750.

rip747 commented 11 years ago

no rush. take you time.