<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Resultant Systems &#187; Mura</title>
	<atom:link href="http://www.resultantsys.com/index.php/tag/mura/feed" rel="self" type="application/rss+xml" />
	<link>http://www.resultantsys.com</link>
	<description>Make the Web Work for Your Business</description>
	<lastBuildDate>Sat, 06 Mar 2010 15:55:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adventures in Mura &#8212; Customizing a Site</title>
		<link>http://www.resultantsys.com/index.php/coldfusion/adventures-in-mura-customizing-a-site/ </link>
		<comments>http://www.resultantsys.com/index.php/coldfusion/adventures-in-mura-customizing-a-site/ #comments</comments>
		<pubDate>Thu, 29 Oct 2009 21:38:20 +0000</pubDate>
		<dc:creator>Clarke Bishop</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Mura]]></category>

		<guid isPermaLink="false">http://www.resultantsys.com/?p=119</guid>
		<description><![CDATA[Mura has a lot of interesting capabilities. However, the documentation is a little sparse.
Recently, I have been customizing a Mura site, so I thought I&#8217;d document some of the key things you need to know!
1 &#8211; Create a New Site to Customize
When initially installed, Mura automatically creates the  &#8220;Default&#8221; site. But, don&#8217;t customize this site. [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Get Mura" href="http://www.getmura.com/" target="_blank">Mura </a>has a lot of interesting capabilities. However, the documentation is a little sparse.</p>
<p>Recently, I have been customizing a Mura site, so I thought I&#8217;d document some of the key things you need to know!</p>
<h2>1 &#8211; Create a New Site to Customize</h2>
<p>When initially installed, Mura automatically creates the  &#8220;Default&#8221; site. But, don&#8217;t customize this site. Make a new site and customize it. This way, you can still do Mura updates without overwriting your customizations.</p>
<ul>
<li>Login to your admin area</li>
<li>Go to <span style="color: #800000;">Site Settings -&gt; Add New Site</span>. (Site Settings is in the upper right of the admin screen.)</li>
<li>Name the site whatever you want. For example, you might call it <span style="color: #800000;">MySite</span>.</li>
<li>Now, when you go to customize things, don&#8217;t look in the Default folder. Instead find the MySite folder.</li>
<li>If you want MySite to come up automatically when you go to www.YourDomain.com, click on <span style="color: #800000;">Site Settings</span>. Then, use the Order drop downs to set MySite to 1.</li>
</ul>
<h2>2 &#8211; Customize /MySite/includes/</h2>
<p>Much of what you&#8217;ll want to customize is in the /MySite/Includes/ directory. Here are some things you might want to customize:</p>
<ul>
<li>If you are using a theme like Merced, customize the style sheet at <span style="color: #800000;">/MySite/includes/themes/merced/css/site.css</span>. It&#8217;s a good idea not to change the other style sheets. Just override the style in site.css. <a title="Mura CSS Info" href="http://docs.getmura.com/index.cfm/developer-guides/front-end-development/css-development/" target="_blank">More Info from Mura &#8230;</a></li>
<li>Again, if you&#8217;re using Merced or another theme, customize the templates at <span style="color: #800000;">/MySite/includes/themes/merced/templates/</span>.  Don&#8217;t forget to look in the <span style="color: #800000;">/inc </span>folder for the header and footer includes. <a title="Customizing Mura Templates" href="http://docs.getmura.com/index.cfm/developer-guides/front-end-development/template-development/" target="_blank">More Info from Mura &#8230;</a></li>
</ul>
<h2>3 &#8211; Change the behavior of Display Objects</h2>
<p>You can change how the Display Objects work! For many Display Objects, you can just copy the display object, put it in <span style="color: #800000;">/MySite/includes/display_objects/custom/</span> and modify your copy. I wanted to add a download link to the images in the image gallery, so it was <a title="Customizing Default Output" href="http://www.getmura.com/index.cfm/blog/customizing-default-output/" target="_blank">more complicated</a>. Matt Levine of Mura advised me to:</p>
<ul>
<li>Go get <span style="color: #800000;">/MySite/includes/eventHandler.cfc</span> and add a new <span style="color: #800000;">onGalleryBodyRender </span>function (See below).</li>
<li>Create a new directory named gallery at <span style="color: #800000;">/MySite/includes/display_objects/custom/gallery</span>. Into this new directory, copy <span style="color: #800000;">index.cfm</span> from <span style="color: #800000;">/default/includes/display_objects/gallery/index.cfm</span>. Now we have a copy of the gallery file to customize, so customize your heart out!</li>
<li>Stay in /gallery/index.cfm. Find the references to <span style="color: #800000;">getSite()</span> and <span style="color: #800000;">queryPermFilter()</span> method calls. Change these to <span style="color: #800000;">renderer.getSite()</span> and <span style="color: #800000;">renderer.queryPermFilter()</span>.</li>
<li>Still in /gallery/index.cfm, change the template path in <span style="color: #800000;">&lt;cfinclude template=&#8221;../dsp_nextN.cfm&#8221;&gt;</span>. The new path should be <span style="color: #800000;">../../../dsp_nextN.cfm</span>.</li>
<li>Reload the app either by clicking Reload Application in the admin, or adding ?appreload to the end of the url. A lot of the objects are loaded when the application starts, so I found it&#8217;s a good idea to reload after making changes.</li>
</ul>
<p>Here&#8217;s the code for the updated eventHandler.cfc:</p>
<p>[cf]</p>
<p>&lt;cffunction name=&quot;onGalleryBodyRender&quot; output=&quot;true&quot; returntype=&quot;void&quot;&gt;<br />
&lt;cfargument name=&quot;event&quot;&gt;<br />
&lt;cfset var renderer=event.getContentRenderer()&gt;<br />
&lt;cfsilent&gt;<br />
&lt;cfset renderer.loadShadowBoxJS() /&gt;<br />
&lt;cfset renderer.addToHTMLHeadQueue(&quot;custom/gallery/htmlhead/gallery.cfm&quot;)&gt;<br />
&lt;cfif not event.valueExists(&#8216;galleryItemID&#8217;)&gt;&lt;cfset event.setValue(&#8216;galleryItemID&#8217;,&#8221;)&gt;&lt;/cfif&gt;<br />
&lt;/cfsilent&gt;</p>
<p>&lt;!&#8212; When you override default output you need to run content throught the renderer.setDynamicContent() method to process [mura] tag calls&#8212;&gt;<br />
&lt;cfoutput&gt;#renderer.setDynamicContent(event.getValue(&#8216;contentBean&#8217;).getBody())#&lt;/cfoutput&gt;</p>
<p>&lt;!&#8212; Now include the customized display object &#8212;&gt;<br />
&lt;cf_CacheOMatic key=&quot;portalBody#event.getValue(&#8216;contentBean&#8217;).getcontentID()##event.getValue(&#8217;startRow&#8217;)##event.getValue(&#8216;galleryItemID&#8217;)#&quot; nocache=&quot;#event.getValue(&#8216;r&#8217;).restrict#&quot;&gt;<br />
&lt;cfinclude template=&quot;display_objects/custom/gallery/index.cfm&quot;&gt;<br />
&lt;/cf_CacheOMatic&gt;</p>
<p>&lt;/cffunction&gt;<br />
[/cf]</p>
<p>I hope this helps someone get started with Mura! If you have suggestions for improving this information or just have a question, please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.resultantsys.com/index.php/coldfusion/adventures-in-mura-customizing-a-site/ /feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
