Hello Guys, I'm building a general utility component for sending emails from my application, so I can use it for error reporting, contact forms, newsletters, order confirmations and alike. I'm looking for the best method to create an HTML wrapper for the content.
At the moment a variable named 'content' which is a plain text string gets passed into the component, and then fired off from a cfmail using the default settings for the bean, but what i'd really like to be able to do is pass in a variable named 'template' or 'wrapper' which is just the path to an HTML file, which is then used as a wrapper around my standard 'content'. This would allow me to use different templates from different areas of the app, without having to hard code the HTML inside my cfc. Inside my HTML I'd just have a DIV with id="Content" as a placeholder or somthing. I could pass in two variables 'header' and 'footer' which I could output adove and below my content, but I'd rather just pass it in as a single file referance. I've also considered the use of custom tags but was in the frame of mind that its bad practiec to use them inside of your model layer as they should only be used inside the view. What would you advise? Thanks chaps, Rob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271703 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

