In Mura CMS, there is the concept of templates that make up your site theme. Your theme can have multiple templates, such as a two-column template and a 3 column template which can be assigned to individual pages in your site. You can read more about templates in Mura here. Recently, while working on a Mura site, I wanted my pages to be able to dynamically use either a 2- or a 3-column template depending on whether something was assigned to the right column display region (which was display region #3 in this site).
So I whipped up this template named default.cfm:
<cfif len( trim($.dspObjects(3)) )> <cfinclude template="three_column.cfm" /> <cfelse> <cfinclude template="two_column_SL.cfm" /> </cfif>
So basically it checks to see if anything was assigned to the right column display region. If so, the 3 column template is rendered. If not it defaults to 2 columns. This way, I can just set all pages to the default template and let the content determine whether 2 or 3 columns are used.

Nov 23, 2010 at 2:11 PM Great idea and tip, Tony. Thanks for sharing!
Nov 23, 2010 at 2:25 PM Simple, but nice idea. thanks for this.
Nov 23, 2010 at 5:24 PM Me likey. Thanks.
Nov 23, 2010 at 9:09 PM Great post! That kind of dynamic template switching is Awesome. One small change that I would do is set the returned value of the dspObjects() call to a variable and then test and render that variable in the template.
<cfset objects3=trim($.dspObjects(3))>
<cfif len( objects3 )>
<cfinclude template="three_column.cfm" />
<cfelse>
<cfinclude template="two_column_SL.cfm" />
</cfif>
And then just output the objects3 variable where you would normally call $.dspObjects(3) in three_column.cfm. This is because if you have any forms or actions items in that region and you run dspObjects() twice you may collect the data or take the action twice.
Nov 24, 2010 at 3:27 AM @Matt,
Thanks for that tip -- I didn't think of that!
Apr 30, 2011 at 8:08 PM Hey very good eample of dynamic template rendering, works good :)
Jul 21, 2011 at 12:53 AM best example thanks for sharing it
Sep 19, 2011 at 3:41 AM nice tips
May 2, 2012 at 2:53 AM Informative post, I’ll definitely try out some of your tips. I’m currently using all in to help me out.but as i see tips are very useful.