Hi,
You can use rendering of layouts by using the renderLayout() method in the renderer plugin. You can do something like this:
Email.Layout.cfm
<html>
my layout
<!--- content will be rendered here --->
<cfoutput>#renderView(view=rc.emailView)#</cfoutput>
</html>
Then in your handlers you can do this:
function sendEmail(){
// set email view
rc.emailView = "emails/customerEmail";
// render body with layout and custom view
body = getPlugin("Renderer").renderLayout("Email.Layout");
}
That's it. this way, you can use rendering of layouts and views a-la-carte. The key is passing the "renderview()" the custom views you like to render in that layout.
I am thinking for 3.0.0 to make this easier by adding a "view" argument to the renderlayout() method and then in your layouts, you would only need to do:
#renderView(arguments.view)#
That's it!