I'm wondering if I could store a part of the template inside a DB Field. I want to allow my CMS users to insert part of the Page template directly through CMS, for example the Page template would be:
<% include Header %>
<% include Footer %>
and UserCode would be a DB field, with text containing template controls, like <% control %> tags and field names, for example:
<h2>$MenuTitle</h2> <!-- or Parent.MenuTitle maybe? CurrentPage.MenuTitle ? -->
<% control Images %>
<img src="$URL" alt="" />
<% end_control %>
And now, when calling 'renderWith', I would like the UserCode content to be rendered as a part of template. So basically it should work just like <% include %>, but not stored as separate files in Includes folders, but directly in DB, managable through CMS.
Is this achievable?
Thx a lot.