First rule of frameworks: never modify the framework code.
You can always write a CFC that extends FW/1 and overrides methods,
then have your Application.cfc extend that new CFC. That way you can
have customizations and still upgrade the FW/1 code.
Second, I'm pretty sure you can already do exactly what you need with
the existing FW/1 extension points. The general approach for a single
app is to override these extension points directly in Application.cfc
but if you're planning to build several apps with this extension,
follow the "Application extends a new CFC that extends FW/1" approach
above.
You'll want to override customizeViewOrLayoutPath() to lookup the
templates and return the appropriate path.
Then you'll want to override internalLayout() and internalView(). In
those functions, check the extension of the layoutPath / viewPath
passed in: if it's .json or .html, it's a Mustache template so render
it and return the rendered result as a string, else call
super.internal*() with the original parameters.
Sean
Sean A Corfield -- (904) 302-SEAN
An Architect's View --
http://corfield.org/
World Singles, LLC. --
http://worldsingles.com/
"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)