<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tyssen Design Blog</title>
<link>http://www.tyssendesign.com.au?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=BlogName&amp;utm_campaign=blog</link>
<description>Tyssen Design Blog</description>
<dc:language>en</dc:language>
<dc:rights>Copyright 2013</dc:rights>
<dc:date>2013-03-25T04:46+00:00</dc:date>
<admin:generatorAgent rdf:resource="http://expressionengine.com/" />
<atom:link href="http://www.tyssendesign.com.au/feed/" rel="self" type="application/rss+xml" />

<item>
<title>Mobile browser usage almost set to overtake desktops</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/mobile/mobile-browser-usage-almost-set-to-overtake-desktops/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=mobile&#45;browser&#45;usage&#45;almost&#45;set&#45;to&#45;overtake&#45;desktops</link>
<guid>http://www.tyssendesign.com.au/articles/mobile/mobile-browser-usage-almost-set-to-overtake-desktops/#When:04:46?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=mobile&#45;browser&#45;usage&#45;almost&#45;set&#45;to&#45;overtake&#45;desktops</guid>
<description>
<![CDATA[
<article>
<p>Any visitors to our&nbsp;<a href="https://www.facebook.com/TyssenDesign">Facebook page</a>&nbsp;would realise that we&#39;ve been following the development of the mobile Internet closely with the take-home message being that more and more, people are using their smart phones&nbsp;and tablets to visit websites. Some of those articles quote different statistics to illustrate this movement, but recently we decided to take a look at the stats for some of the websites that we&#39;ve developed ourselves.</p>

<p>And despite global browser usage statistics showing that Internet Explorer is Australia&#39;s most popular browser, followed by&nbsp;Google Chrome, studying 21 of&nbsp;our own sites told a different story.</p>

<figure><span class="shadow"><img alt="" src="/uploads/img/StatCounter-browser-AU-monthly-201202-201302.jpg" /></span><figcaption>StatCounter&#39;s graph of browser usage in Australia for the last year</figcaption></figure>

<p>Rather than being in fourth place, <strong>Safari</strong> was the most used browser for 38% of the sites we looked at compared to 47.7% for Internet Explorer, and the reason that figure is so high is because most people are using Mobile Safari on their iPhones and iPads. Mobile Safari was used more than the desktop version for <strong>80.9%</strong> of the sites, and surprisingly it&#39;s not all people using iPads, as tablet usage was only higher than other mobile devices for 38% of the sites. So it would seem&nbsp;that there&#39;s a lot of people using their iPhones (or iPod Touches) to visit sites we&#39;ve created.</p>

<p>Here&#39;s a table that illustrates the popularity of the different browsers from the 21 sites we looked at.</p>

<table class="table-striped">
	<caption>Browser Popularity <small>December 2012&ndash;March 2013</small></caption>
	<thead>
		<tr>
			<th>&nbsp;</th>
			<th colspan="4">Ranking</th>
		</tr>
		<tr>
			<th scope="col">Browser</th>
			<th scope="col">1</th>
			<th scope="col">2</th>
			<th scope="col">3</th>
			<th scope="col">4</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<th scope="row">Internet Explorer</th>
			<td>10</td>
			<td>6</td>
			<td>3</td>
			<td>2</td>
		</tr>
		<tr>
			<th scope="row">Safari</th>
			<td>8</td>
			<td>5</td>
			<td>4</td>
			<td>4</td>
		</tr>
		<tr>
			<th scope="row">Chrome</th>
			<td>2</td>
			<td>8</td>
			<td>10</td>
			<td>1</td>
		</tr>
		<tr>
			<th scope="row">Firefox</th>
			<td>1</td>
			<td>2</td>
			<td>4</td>
			<td>13</td>
		</tr>
	</tbody>
</table>

<p><small>If you&#39;re wondering why the numbers for Firefox don&#39;t add up to 21, it&#39;s because it was actually the fifth most popular browser for one of the sites we looked at.</small></p>

<p>And of the sites included in this analysis that have specific mobile optimisation work done, we&#39;ve seen significantly better engagement from people using mobile devices, in other words, visiting more pages, spending more time on the site, and lower <a href="http://en.wikipedia.org/wiki/Bounce_rate">bounce rates</a>.</p>

<p>As we&#39;ve noted before, <a href="/articles/mobile/get-yourself-mobile-its-not-as-difficult-as-you-think/">getting your site mobile friendly isn&#39;t as hard as you might think</a>, so <a href="/contact/">get in touch</a> to find out how we can help.</p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/mobile/mobile-browser-usage-almost-set-to-overtake-desktops/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=mobile&#45;browser&#45;usage&#45;almost&#45;set&#45;to&#45;overtake&#45;desktops">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2013-03-25T04:46+00:00</dc:date>
</item>

<item>
<title>CMS Review: Processwire</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/processwire/cms-review-processwire/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=cms&#45;review&#45;processwire</link>
<guid>http://www.tyssendesign.com.au/articles/processwire/cms-review-processwire/#When:22:31?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=cms&#45;review&#45;processwire</guid>
<description>
<![CDATA[
<article>
<p>Here at Tyssen Design, we&#39;re big fans of <a href="/web-design-services/expressionengine/">ExpressionEngine</a> and use it for a lot of our work, but it&#39;s&nbsp;not always the right fit for every project, so over the last year or so we&#39;ve been testing out a few alternative <a href="/web-design-services/content-management-systems-cms/">content management systems</a>, some of which we&#39;ve <a href="http://www.johnfaulds.com.au/tag/CMS/">reviewed before</a>.</p>

<p>Today, we&#39;re going to look at <a href="http://processwire.com/">Processwire</a>, which has been on our radar for a while. It touts its main features&nbsp;as&nbsp;<q>all custom fields, an easy-to-use jQuery-inspired API, and a powerful selector engine</q>. It was chosen as <a href="http://www.cmscritic.com/critics-choice-for-best-free-cms-goes-to/">CMS Critic&#39;s best free CMS for 2012</a>, and we know a few people who use it and swear by it, and it&#39;s also come up occasionally in <a href="http://processwire.com/ee-pw/">comparisons</a> with <a href="http://processwire.com/talk/topic/2391-expressionengine-new-pricing-structure-and-how-processwire-could-benefit/">ExpressionEngine</a>, all reasons which made us want to try it out.</p>

<figure><span class="shadow">​<img alt="Screenshot of the Processwire home page" src="/uploads/img/processwire-home.jpg" /></span></figure>

<h2>Installation</h2>

<p>Like most CMSs, installation is a snap with a wizard to guide you through the process and give you pointers as to things you&#39;ve forgotten to do when getting read to install, like setting correct permissions on folders and files. Unlike some, it&#39;s process is probably a little more friendly, by starting off with a check of everything first, marking the items in either green or red for the ones that need fixing. This is better than having you start the installation process, then encountering errors which require you to fix things then go back a step.</p>

<p>Processwire installs with a standard set of pages that include <em>Home</em>, <em>About</em>, <em>Search</em>, <em>Sitemap</em> and <em>404 Page Not Found</em>, and these pages are displayed with a default theme too. By default, Processwire installs with very few main menu items: just <em>Pages</em> for content, <em>Setup</em>&nbsp;for templates and fields (and settings pages for some&nbsp;modules), <em>Modules</em> and <em>Access</em> where you set up users, roles and permissions. Although, what&#39;s displayed in the control panel is all controlled by the <em>Admin</em> page which is displayed in the main <em>Pages</em> tree, so you can add and remove things as you like. There&#39;s also a selection of different <a href="http://modules.processwire.com/categories/admin-theme/">admin themes</a> to choose from. (We&#39;re using Futura Remixed currently.)</p>

<p>Although we haven&#39;t had the need to do it yet,&nbsp;<a href="http://processwire.com/talk/topic/52-how-do-i-upgrade-processwire-to-the-latest-version/">upgrading the CMS to the latest version</a> also seems like a fairly pain-free experience.</p>

<h2>Pages</h2>

<figure class="img-r"><span class="shadow"><img alt="Screenshot of Processwire's Pages tree" src="/uploads/img/processwire-pages.png" /></span></figure>

<p>Processwire is built around a <q>hierarchal structure for pages, like a family tree or a file system</q>. Everything that appears on the front end of your site has to appear in this tree somewhere. Clicking on pages will automatically display their children if they have them as well as an actions menu alongside for choosing whether to edit, view, add new child pages or move pages by dragging and dropping. It&#39;s fairly easy to move through a whole site&#39;s site map from the&nbsp;one page in this way. It&#39;s the same sort of functionality that <a href="http://buildwithstructure.com/">Structure</a> brings to the table with ExpressionEngine, although I think the UI for Structure is a bit nicer.</p>

<p>Every page is made up of a series of custom fields which you define under <em>Setup / Fields </em>and has a template assigned to it which you create and manage under <em>Setup / Templates</em>. Before custom fields are available on a publish page though, they have to be assigned to the template that you add to a page. So creating a new page is a two-step process:</p>

<ol>
	<li>first you need to give the page a name (with it&#39;s URL slug automatically populated like with ExpressionEngine) and assign a template to it and save,</li>
	<li>then when the system knows which set of fields to display based on the template you&#39;ve chosen,&nbsp;you get a publish page where you can enter your content and press <em>Publish</em> to have the page appear on the site.</li>
</ol>

<p>Pages that aren&#39;t published are viewable in the control panel but not on the front end, so it&#39;s easy to create drafts and you don&#39;t have to set up specific entry statuses.</p>

<h2>Custom fields</h2>

<figure class="img-r" style="width:278px"><span class="shadow"><img alt="Screenshot of the images custom field type" src="/uploads/img/processwire-images.png" /></span><figcaption>This screenshot shows both an image that has been uploaded and one that has been deleted</figcaption></figure>

<p>Out of the box, Processwire comes with several custom field types including text, textarea &ndash;&nbsp;which can be converted to a rich text editor&nbsp;(RTEs), image, file, checkbox, date and URL.</p>

<p>Textareas and the images field have been implemented really well. The images field is by default a repeater field, i.e. you can keep adding images to it, in fact you can grab a whole bundle of images and drag them into the field area and they&#39;ll automatically get added. Each image added has its own description field for adding a caption.</p>

<p>So for quickly adding lots of images, ideal for creating image galleries, Processwire is much better equipped out of the box than ExpressionEngine. EE can achieve a similar level of ease of workflow, but you need to purchase add-ons to do it.</p>

<figure class="img-l"><span class="shadow"><img alt="Screenshot of the page linking ability built into the rich text editors in Processwire" src="/uploads/img/processwire-links.png" /></span></figure>

<p>Even though textareas use TinyMCE for rich text editing&nbsp;(I&#39;d prefer CKEditor which I believe has progressed further in recent years), the link and image buttons have tight integration with the rest of the CMS, enabling you to easily add images to the content and apply CSS classes for alignment (rather than inline style), and to choose pages already created to link to.</p>

<p>The only drawback I found with adding images in this way, is that the images have to be added to the page via a standard images field;&nbsp;there&#39;s no way to upload an image from the modal window launched from within TinyMCE. You can also only choose images that are added to the page you&#39;re on, or from another page. You can&#39;t select images from a global file manager because there isn&#39;t one. This seems like a bit of an oversight to me as this sort of feature is pretty standard among other CMSs, for example, ExpressionEngine, Concrete5 and Wordpress all have one.</p>

<p>The standard images field also has no way to select existing images, you have to upload the same image again using this field type, even if the file exists on another page somewhere. From a duplication and space taken on the server point of view, this isn&#39;t ideal, but because adding images is so easy, it&#39;s easier to overlook.</p>

<h2>Templating</h2>

<p>One of the things that delayed me getting into Processwire is that it uses plain PHP as it&#39;s templating language. I think my frustration with templating in Wordpress whenever I&#39;ve had to get involved with it more recently coloured my view of writing code in PHP, but that&#39;s more to do with the way Wordpress works (or more specifically the way themes designed for it are put together) than with PHP itself.</p>

<p>By default, Processwire comes with a theme where the templates are split up into global header and footer includes, but it&#39;s also possible to follow a template partials approach and use a master layout template which individual templates then pass their specific data/code to. Here&#39;s an example of something similar to what I&#39;ve been working with.</p>

<figure class="code">
<pre class="brush: php">
&lt;!doctype html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;&lt;?php echo $page-&gt;get(&quot;title&quot;); ?&gt;&lt;/title&gt;
	&lt;/head&gt;
	&lt;body class=&quot;&lt;?php echo $page-&gt;name; ?&gt;&quot;&gt;
	&lt;header role=&quot;banner&quot;&gt; &lt;/header&gt;
	&lt;div id=&quot;content&quot;&gt;
		&lt;article role=&quot;main&quot;&gt;
			&lt;?php echo $main_content; ?&gt;
		&lt;/article&gt;
		&lt;aside role=&quot;complementary&quot;&gt;
			&lt;?php echo $sidebar_content; ?&gt;
		&lt;/aside&gt;
	&lt;/div&gt;
	&lt;footer role=&quot;contentinfo&quot;&gt; &lt;/footer&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<figcaption>The main global layout template</figcaption></figure>

<figure class="code">
<pre class="brush: php">
&lt;?php

/**
* Page template
*/

$image = $page-&gt;images-&gt;first();
if($image) :
	if($image-&gt;width &gt;= 760) :
		$cropped = $image-&gt;size(760, auto);
	else:
		$cropped = $image;
	endif;
endif;

$main_content = &quot;&lt;h1&gt;&#123;$page-&gt;title&#125;&lt;/h1&gt;&quot;;

if($cropped) $main_content .= &#39;&lt;img src=&quot;&#39;.$cropped-&gt;url.&#39;&quot; alt=&quot;&quot;&gt;&#39;;

$main_content .= $page-&gt;body;

include(&quot;./main.inc.php&quot;);</pre>
<figcaption>An individual page template</figcaption></figure>

<p>In the examples above, everything that appears after <code>$page-&gt;</code> is the name of a custom field.</p>

<p>Processwire has a fairly robust <a href="http://processwire.com/api/">API</a> inspired by jQuery for selecting data from your pages. We&#39;ve only built fairly simple sites with Processwire so far, so we haven&#39;t had a need to fully explore the power of its selectors, but from the looks of the documentation, you could get quite sophisticated with your querying without having to write any SQL. Which brings me to my next point.</p>

<h2>Documentation</h2>

<p>Definitely one of the weakest points about Processwire is its documentation. There&#39;s a lot of good stuff in the official API guide, but there&#39;s also a whole lot of stuff which seems to only exist in forum threads, often with code examples followed by modified code examples, or links to modules at the bottom of individual forum posts.</p>

<p>You can usually find what you&#39;re looking for after looking around the forums a bit, but it&#39;s not as easy as it should be. From speaking to a couple of people it seems that&nbsp;Ryan Cramer, Processwire&#39;s creator, and the other core developers, are aware of the problem, so hopefully there&#39;ll be some improvement on the horizon.</p>

<h2>Pros and Cons</h2>

<h3>Pros</h3>

<ul>
	<li>Uncomplicated control panel so it&#39;s easy to get used to where everything is.</li>
	<li>Easy page management with drag and drop functionality.</li>
	<li>A good collection of first party and third party modules (nearly all free) for adding a variety of functionality.</li>
	<li>Templating language that most people would be familiar with, and no need to learn new tags (although you do still need to learn what you can do with the API).</li>
	<li>Easy to set up templates, custom fields and users/roles.</li>
	<li>Easy to use image&nbsp;and RTE field types.</li>
	<li>The developer community around Processwire seems quite small but approachable and happy to help out.</li>
	<li>Updating seems to be a lot easier than with EE.</li>
</ul>

<h3>Cons</h3>

<ul>
	<li>Everything has to be a &#39;page&#39; even if you don&#39;t use it as a page.&nbsp;For example, if you want to create a custom field which has checkboxes or select options, you actually have to create separate pages&nbsp;and then use a page-relation field type to have each page appear as an option in a publish form. Sometimes you might actually want site visitors to visit those pages, so it makes sense that you create them as pages, but that won&#39;t always be the case. And then you&#39;d have to explain to clients why some pages are actually <em>pages</em> and others are something else.</li>
	<li>Doesn&#39;t have global variables, so small snippets of editable content also need to be created as &#39;pages&#39;.</li>
	<li>As already mentioned, the lack of a global file manager is a shortcoming.</li>
	<li>There&#39;s no native contact form module. There is <a href="http://store.di.net/products/processwire-form-builder">one you can buy</a> (and it also has a developer&#39;s licence) and there is also <a href="https://github.com/ryancramerdesign/FormTemplateProcessor">this free one</a> which can be used but both make use of Processwire&#39;s back-end form mark-up on the front end. While you can customise the output, you don&#39;t have 100% control, i.e. currently you can&#39;t add custom attributes (for instance I always like to add&nbsp;<code>required aria-required=&quot;true&quot;</code> to required inputs to bring native browser validation into play), and anything involving radio buttons or checkboxes gets output inside unordered list tags, and there&#39;s no way to wrap all the controls in a fieldset with a legend.</li>
	<li>The documentation I&#39;ve already mentioned.</li>
</ul>

<p>But all in all, I think it&#39;s a good system, and from not having tried it just over a month ago, we&#39;ve now built four small sites with it,&nbsp;and can easily see it&nbsp;being used it quite a bit on smaller sites that ExpressionEngine is overkill for (although BlockCMS just hit public beta this week, so that may change ;) ). Thanks to <a href="https://twitter.com/stlmvin">Marty Walker</a> for his help with my questions and general tweeting about Processwire.</p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/processwire/cms-review-processwire/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=cms&#45;review&#45;processwire">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2013-03-04T22:31+00:00</dc:date>
</item>

<item>
<title>Get yourself mobile &amp;mdash; it&#8217;s not as difficult as you think</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/mobile/get-yourself-mobile-its-not-as-difficult-as-you-think/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=get&#45;yourself&#45;mobile&#45;its&#45;not&#45;as&#45;difficult&#45;as&#45;you&#45;think</link>
<guid>http://www.tyssendesign.com.au/articles/mobile/get-yourself-mobile-its-not-as-difficult-as-you-think/#When:23:27?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=get&#45;yourself&#45;mobile&#45;its&#45;not&#45;as&#45;difficult&#45;as&#45;you&#45;think</guid>
<description>
<![CDATA[
<article>
<p>Mobile Internet is massive in Australia; we have nearly 9 million smart phone users, approximately 37% of the population, making us the second most smart phone-friendly nation in the world. More than 2 million Australians use their mobile phone to access the Internet each month (Roy Morgan Research), with more than half doing product searches. In fact, research from Google indicates more than 40% of shopping-related enquiries come from mobile devices, but less than one third of small businesses have a mobile-friendly site.</p>

<p>Those numbers are only going to get higher, with mobile Internet usage tipped to outstrip that of the desktop (which includes desktop and laptop computers) in the next year or so.</p>

<p>So if you don&#39;t have a website that works well on mobile devices (smart phones and tablets), you could well be missing out.</p>

<p>But the good news is that it&#39;s not that hard to get your business ready for mobile; you don&#39;t necessarily need to rush out and have an app developed.</p>

<p>The first step would be to actually get yourself a website if you don&#39;t already have one because people are increasingly unlikely to buy from you or visit your business unless they can check out your website first. But we&#39;ll assume that you already have one, and are just after ways of making it work for mobile.</p>

<h2>Create a mobile version of your site</h2>

<p>While smart phones do a pretty good job of fitting your site&#39;s layout into their small screens, it&#39;s not as convenient for your visitors to keep having to tap to zoom in and out.</p>

<p>Creating a layout that automatically fits the screen it is viewed on will reduce the number of taps people have to make, making navigating your site easier and creating a more positive impression.</p>

<p>How this is done will depend on your site, its content and goals, but you wouldn&#39;t necessarily need to create a completely separate mobile site. For many smaller sites, your current site&#39;s layout could be made &lsquo;responsive&rsquo; or &lsquo;adaptive&rsquo; which means it adapts to whatever size screen it is viewed on.</p>

<p>Ideally, mobile layout considerations would be included in the original planning and design phase for your site, but existing sites can have mobile-friendly styles &lsquo;retrofitted&rsquo; if you are looking for a short-term solution.</p>

<h2>Keep pages as light as possible</h2>

<p>Not only do search engines give preference to faster pages in their results, but particularly for mobiles, fast-loading pages are essential if you want to capture people&#39;s attention and keep them on your site. This ties in to the point above, but when creating a mobile version of the site, whether it&#39;s a separate site, or the same site using an adaptive layout, code and images would be optimised to ensure your site loads as quickly as possible on mobile.</p>

<h2>Replace Flash</h2>

<p>Flash is a technology that adds animation and movement to websites, but unfortunately it doesn&#39;t work on Apple&#39;s iPhones and iPads. So if you have Flash on your site and you view it on an iOS device, you&#39;ll just see a blank space, which doesn&#39;t leave a very good impression.</p>

<p>In most cases, Flash can be replaced with HTML and javascript that will work everywhere, and is easier to update.</p>

<h2>Design changes</h2>

<p>With limited screen real estate, you may need to make some slight adjustments to the layout of your pages, particularly the home page.</p>

<p>Make contact details highly visible, use less copy on your home page, and don&#39;t have pages that are cluttered with links.</p>

<h2>Claim your local business listing on Google Places</h2>

<p>Many people on the go will use Google maps or Google Places to find businesses close by. Claiming your business on Google Places and linking your office or shop to Google Maps means you are more likely to be found by these people.</p>

<p>If you&#39;d like help getting your website mobile-friendly, or would like someone to assess how well your site performs on mobile now, please get in contact, we&#39;d love to help.</p>

<p class="cta"><a href="/contact/">Get your website mobile-friendly</a></p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/mobile/get-yourself-mobile-its-not-as-difficult-as-you-think/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=get&#45;yourself&#45;mobile&#45;its&#45;not&#45;as&#45;difficult&#45;as&#45;you&#45;think">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2012-12-03T23:27+00:00</dc:date>
</item>

<item>
<title>More Stash examples</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/cms/more-stash-examples/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=more&#45;stash&#45;examples</link>
<guid>http://www.tyssendesign.com.au/articles/cms/more-stash-examples/#When:03:02?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=more&#45;stash&#45;examples</guid>
<description>
<![CDATA[
<article>
<p>As promised in the last <a href="/articles/cms/redesigning-expressionengine-sites/">post</a> I&#39;m going to delve a bit more into some <a href="https://github.com/croxton/Stash/">Stash</a> examples I&#39;ve used on other ExpressionEngine projects.</p>

<h2>Shortcodes with Stash</h2>

<p>If you&#39;re unfamiliar with the term &lsquo;shortcode&rsquo;, it comes from <a href="http://codex.wordpress.org/Shortcode">Wordpress</a> and gives an author the ability to drop a block of code into their WYSIWYG editor where they want it which is pretty useful if you want to have some paragraphs of text, a block of code that does something else like a gallery or form or list of related entries, and can then follow up with more content without needing to split things up into separate fields.</p>

<p>In Wordpress a shorcode would look like <code>[name_of_shortcode]</code> and you could place that anywhere in the body of your entry and it would be converted into whatever code was contained within the file (usually a plugin) that the shortcode was called from.</p>

<figure class="code">
<pre class="brush: html">
&lt;p&gt;Lorem ipsum dolor sit amet&hellip;&lt;/p&gt;

[name_of_shortcode]

&lt;p&gt;Lorem ipsum dolor sit amet&hellip;&lt;/p&gt;
	</pre>
<figcaption>An example of a post with &lsquo;shortcode&rsquo;</figcaption></figure>

<p>To do the same sort of thing with native ExpressionEngine functionality, you&#39;d need separate fields: one for each block of text that would need to be separated by other code in the template. And in the template, you&#39;d need to use either separate channel entries tags for each block or use embeds so that you could insert code from other channels in between the fields.</p>

<p>But with Stash, you can do pretty much the same thing as you would in Wordpress. Here&#39;s a couple of different examples.</p>

<h3>Example 1</h3>

<p>This example comes from the <a href="http://www.spineplus.com.au/about/team/">SpinePlus</a> website which was redesigned earlier this year. The subheadings, paragraphs of text and the large single image at the bottom of the page come from a single entry in a <em>Site Pages</em> channel. The headshots of the visiting practitioners come from a <em>Staff</em> channel. Here&#39;s how it&#39;s done:</p>

<figure class="code">
<pre class="brush: ee">
&#123;exp:stash:set name=&quot;st_shortcode&quot;&#125;
&lt;ul&gt;
	&#123;exp:channel:entries
		channel=&quot;staff&quot;
	&#125;
	&lt;li&gt;
		&#123;exp:imgsizer:size src=&quot;&#123;image&#125;&quot; width=&quot;150&quot; alt=&quot;&quot;&#125;
		&lt;h2&gt;&#123;title&#125;&lt;/h2&gt;
		&lt;p&gt;&#123;position&#125;&lt;/p&gt;
	&lt;/li&gt;
	&#123;/exp:channel:entries&#125;
&lt;/ul&gt;
&#123;/exp:stash:set&#125;

&#123;exp:stash:set name=&quot;st_content&quot; parse_tags=&quot;yes&quot;&#125;

	&#123;exp:channel:entries
		channel=&quot;site&quot;
		url_title=&quot;&#123;last_segment&#125;&quot;
	&#125;
		&#123;exp:allow_eecode&#125;
			&#123;body&#125;
		&#123;/exp:allow_eecode&#125;
	&#123;/exp:channel:entries&#125;

&#123;/exp:stash:set name=&quot;st_content&quot;&#125;
	</pre>
<figcaption>The SpinePlus Team page template</figcaption></figure>

<p>The information for the practitioners is saved to its own Stash variable which is then inserted into the body of the main page entry with <code>&#123;exp:stash:get name=&quot;st_shortcode&quot;&#125;</code> at the point where it should appear. Then in <code>&#123;st_content&#125;</code> which is the Stash which displays the content on the page, we wrap the <code>&#123;body&#125;</code> tag in <a href="http://expressionengine.com/downloads/details/allow_ee_code/">Allow EE Code</a> plugin tags so that the Stash variable actually gets parsed (remember the <code>parse_tags</code> parameter).</p>

<h3>Example 2</h3>

<p>This example is still in development but it&#39;s doing a similar thing except that the <em>Packages</em> channel is being used to insert some content in the middle of the body of another entry and then after it too all using a single channel entries tag. This is because the content inserted into the body contains in-page anchors to the content that appears further down the page.</p>

<figure class="code">
<pre class="brush: ee">
&#123;exp:channel:entries
	channel=&quot;packages&quot;
&#125;
	&#123;!-- Using some regex on the title to pull out certain entries --&#125;
	&#123;exp:stash:append name=&quot;st_packages&quot; match=&quot;#^((?!Standard).)*$#&quot; against=&quot;&#123;title&#125;&quot;&#125;
		&lt;dt&gt;&lt;a href=&quot;#&#123;url_title&#125;&quot;&gt;&#123;title&#125; Service Package&lt;/a&gt;&lt;/dt&gt;&lt;dd&gt;&#123;package_price&#125;&lt;/dd&gt;
	&#123;/exp:stash:append&#125;

	&#123;!-- Picking out entries that have a detail page --&#125;
	&#123;exp:stash:append name=&quot;st_packages_full&quot; match=&quot;#y#&quot; against=&quot;&#123;has_detail_page&#125;&quot;&#125;
		&lt;h3 id=&quot;&#123;url_title&#125;&quot;&gt;&#123;title&#125; Service Package &lt;span&gt;&#123;package_price&#125; &#123;package_price_extended&#125;&lt;/span&gt;&lt;/h3&gt;
		&#123;package_description&#125;
	&#123;/exp:stash:append&#125;

&#123;/exp:channel:entries&#125;

&#123;exp:channel:entries
	channel=&quot;site&quot;
	url_title=&quot;packages&quot;
&#125;
	&#123;exp:stash:set_value name=&quot;st_page_title&quot; value=&quot;&#123;title&#125;&quot;&#125;

	&#123;exp:stash:set name=&quot;st_content&quot; parse_tags=&quot;yes&quot;&#125;
		&#123;exp:allow_eecode&#125;
		&#123;body&#125;
		&#123;/exp:allow_eecode&#125;

		&#123;stash:st_packages_full&#125;

	&#123;/exp:stash:set&#125;

&#123;/exp:channel:entries&#125;
	</pre>
</figure>

<p>As with the previous example, <code>&#123;st_packages&#125;</code> is inserted into the body of the entry wrapped in <code>&#123;exp:allow_eecode&#125;</code>.</p>

<h2>Displaying other items from the same category</h2>

<p>This example isn&#39;t online either because the requirements changed after it had been done. Originally the brief was to display a list of entries from the same category on a product&#39;s individual entry page (later a Playa field was used instead to choose which entries would be related to it).</p>

<p>So what we had to do was get the category that the product belonged to (only one category was assigned from this particular group), and then output a list of other entries from that category. Content specific to the individual entry also needed to be displayed above and below the related entries.</p>

<figure class="code">
<pre class="brush: ee">
&#123;exp:stash:parse&#125;

	&#123;exp:channel:entries
		channel=&quot;&#123;segment_1&#125;&quot;
	&#125;

		&#123;!-- Get the category ID of the product whose page we&#39;re on --&#125;
		&#123;categories limit=&quot;1&quot;&#125;
			&#123;exp:stash:set_value name=&quot;st_category_id&quot; value=&quot;&#123;category_id&#125;&quot;&#125;
		&#123;/categories&#125;

		&#123;exp:stash:set name=&quot;st_content&quot;&#125;

			Individual entry content goes here&hellip;

			&#123;!--  We don&#39;t want this to be parsed here since it will be filled with a value later on --&#125;
			&#123;stash:nocache&#125;&#123;exp:stash:get name=&quot;st_related_products&quot;&#125;&#123;/stash:nocache&#125;

			More individual entry content goes here&hellip;

		&#123;/exp:stash:set&#125;

	&#123;/exp:channel:entries&#125;

&#123;/exp:stash:parse&#125;

&#123;!-- Get the entries from the same category --&#125;
&#123;exp:stash:set name=&quot;st_related_products&quot; parse_tags=&quot;yes&quot;&#125;

	&#123;exp:channel:entries
		channel=&quot;&#123;segment_1&#125;&quot;
		category=&quot;&#123;exp:stash:get name=&#39;st_category_id&#39;&#125;&quot;
		limit=&quot;10&quot;
		parse=&quot;inward&quot;
		url_title=&quot;not &#123;segment_3&#125;&quot;
	&#125;

		&lt;li&gt;&lt;a href=&quot;&#123;path=&#123;segment_1&#125;/view/&#123;url_title&#125;&#125;/&quot; title=&quot;&#123;title&#125;&quot;&gt;&#123;products_images limit=&quot;1&quot;&#125;&#123;exp:ce_img:single src=&quot;&#123;image&#125;&quot; max_width=&quot;130&quot; max_height=&quot;130&quot; attributes=&#39;alt=&quot;&quot;&#39;&#125;&#123;/products_images&#125;&lt;/a&gt;&lt;/li&gt;

	&#123;/exp:channel:entries&#125;

&#123;/exp:stash:set&#125;
	</pre>
</figure>

<p>The tricky thing about this example was working around ExpressionEngine&#39;s parse order which meant that the <code>category_id</code> wasn&#39;t being parsed until after it was required by the channel entries tag where it was required as a parameter.</p>

<p>As is often the case, I had to ask <a href="http://devot-ee.com/members/profile/croxton">Mark Croxton</a> for some help and the solution was to force the opening block to parse <code>&#123;st_category_id&#125;</code> with <code>&#123;exp:stash:parse&#125;</code> wrapped around the whole block, and then <code>&#123;stash:nocache&#125;</code> around <code>&#123;exp:stash:get name=&quot;st_related_products&quot;&#125;</code> to make sure it wasn&#39;t parsed until later.</p>

<h2>Stash within a Stash</h2>

<p>This example was used for the <a href="http://www.barben.com.au/index.php/products/washroom/baby-change/kb100-st/">individual product pages</a> on the Barben website.</p>

<p>Each page has a carousel of other products in the same category which are displayed below the main product. But the position of the carousel is also controlled by a <code>start</code> variable which equals the <code>count</code> of the entry. So we needed two Stash variables: one for the carousel code and one for the count of the entry.</p>

<figure class="code">
<pre class="brush: ee">
&#123;!-- Force Stash to parse tags and conditionals --&#125;
&#123;exp:stash:set parse_tags=&quot;yes&quot; parse_conditionals=&quot;yes&quot;&#125;

	&#123;stash:st_prod_nav&#125;

		&#123;exp:channel:entries
			channel=&quot;&#123;segment_1&#125;&quot;
			category=&quot;&#123;segment_3&#125;&quot;
		&#125;
			&#123; if count==1&#125;
			&lt;nav class=&quot;carousel&quot;&gt;
				&lt;ul&gt;
					&#123;/ if&#125;
					&lt;li&gt;&lt;a href=&quot;&#123;url_title_path=xxxx&#125;&quot;&gt;&#123;exp:ce_img:single src=&quot;&#123;p_thumb&#125;&quot; max_width=&quot;140&quot; max_height=&quot;140&quot;&#125;&lt;span&gt;&#123;title&#125;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
					&#123; if url_title==segment_3&#125;&#123;stash:st_start&#125;start: &#123;count&#125;&#123;/stash:st_start&#125;&#123;/ if&#125;
				&#123; if count==total_results&#125;&lt;/ul&gt;
			&lt;/nav&gt;
			&#123;/ if&#125;

		&#123;/exp:channel:entries&#125;

	&#123;/stash:st_prod_nav&#125;

&#123;/exp:stash:set&#125;

&lt;article role=&quot;main&quot;&gt;
	&#123;st_content&#125;
&lt;/article&gt;

&#123;!-- The nav gets called here --&#125;
&#123;exp:stash:get name=&quot;st_prod_nav&quot;&#125;

&hellip;

&lt;script&gt;
	$(&#39;.carousel ul&#39;).jcarousel(&#123;
		buttonNextHTML: &#39;&lt;span id=&quot;next&quot; class=&quot;carousel-nav&quot;&gt;&lt;/span&gt;&#39;,
		buttonPrevHTML: &#39;&lt;span id=&quot;prev&quot; class=&quot;carousel-nav&quot;&gt;&lt;/span&gt;&#39;,
		&#123;exp:stash:get name=&quot;st_start&quot;&#125; // The count variable gets called here
	&#125;);
&lt;/script&gt;
	</pre>
</figure>

<p>As mentioned before, a lot of these examples have been arrived at with the help of Mark, so major thanks to him for not only developing such a powerful and useful add-on, but for also being on hand to answer questions about it.</p>

<p>So that&#39;s it; I&#39;m out of interesting examples for now, but when I&#39;ve got a few more up my sleeve, will post them here. As before, if you&#39;ve got any interesting examples yourselves, feel free to share in the comments.</p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/cms/more-stash-examples/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=more&#45;stash&#45;examples">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2012-09-26T03:02+00:00</dc:date>
</item>

<item>
<title>The Redesign Details &#8212; ExpressionEngine</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/cms/the-redesign-details-expressionengine/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=the&#45;redesign&#45;details&#45;expressionengine</link>
<guid>http://www.tyssendesign.com.au/articles/cms/the-redesign-details-expressionengine/#When:06:36?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=the&#45;redesign&#45;details&#45;expressionengine</guid>
<description>
<![CDATA[
<article>
<p>As you may have noticed, this site has been redesigned recently, and I mentioned in the announcement that I&#39;d talk about some of the work that went into the process. So in this first instalment of what might be a two or three-part series, I&#39;m going to talk about some of what&#39;s going on under the hood in (the) ExpressionEngine. In the other parts, I&#39;ll cover topics relating to design in general, and aspects of the front-end development. In terms of how sites normally get built, that&#39;s a bit backwards, as integrating your design and content into the CMS usually comes last, but most of what I&#39;m going to discuss here relates to Stash, which seems to be a bit of a hot topic at the moment.</p>

<h2>Bangers &amp; Stash</h2>

<p>Yep, so tasty that you just want to smother it in gravy and eat it up! If you&#39;re not familiar with <a href="https://github.com/croxton/Stash/">Stash</a> by <a href="http://hallmark-design.co.uk/">Mark Croxton</a> yet, you should be because it&#39;s awesome in so many ways, some of which are discussed by <a href="http://eeinsider.com/articles/template-partials-using-stash/">Adrienne Travis on EE Insider</a>. One of Stash&#39;s greatest strengths, its amazing flexibility for use in a variety of situations, I think is also one of its shortcomings when it comes to uptake by developers. Because there&#39;s so many different things it can be used for, for people new to it, I think it can be a bit hard to grasp just how it can benefit you in your own work.</p>

<p>I&#39;m very much a learn from examples type of guy, so rather than give a dissertation on why I use it, I&#39;m just going to dive straight into some examples from the build of this site and others I&#39;ve worked on recently.</p>

<h2>Templates</h2>

<h3>Standard pages</h3>

<p>There are actually separate template groups for all the main sections of the site, even though the templates for some like <em>About</em> and <em>Info</em> are essentially the same. That&#39;s just so I didn&#39;t have to use either the Pages module or something like Structure or Navee to assign the same template to pages that appear under different URLs. But even though I have different template groups for the sections, they all make use of the same code like this:</p>

<figure class="code">
<pre class="brush: ee">
&#123;exp:channel:entries channel=&quot;site&quot; url_title=&quot;&#123;segment_2&#125;&quot;
&#123;sn_page&#125;</pre>
<figcaption>Standard page template</figcaption></figure>

<p>Just the start of the channel entries tag to set the channel and the entry to display, the rest is contained in the <code>&#123;sn_page&#125;</code> snippet.</p>

<figure class="code">
<pre class="brush: ee">
limit=&quot;1&quot; disable=&quot;categories|member_data|pagination|trackbacks&quot;&#125;
 	&#123; if no_results&#125;&#123;redirect=&quot;404&quot;&#125;&#123; /if&#125;

	&#123;embed=&quot;_embeds/index&quot; body_class=&quot;&#123;segment_1&#125;&quot; nav_active=&quot;&#123;segment_1&#125;&quot;&#125;

		&#123;exp:stash:set_value name=&quot;st_page_title&quot; value=&quot;&#123;title&#125;&quot;&#125;

		&#123;exp:stash:set name=&quot;st_content&quot;&#125;
			&#123;body&#125;
		&#123;/exp:stash:set&#125;

	&#123;/exp:channel:entries&#125;

	&#123;exp:stash:set name=&quot;st_side&quot;&#125;

		&#123;!-- Sidebar stuff like: --&#125;
		&#123;sn_testimonials&#125;

		&#123;sn_social-links&#125;

	&#123;/exp:stash:set&#125;</pre>
<figcaption>The &#123;sn_page&#125; snippet</figcaption></figure>

<p>The snippet finishes off the channel entries tag (these parameters are common) and then a single embed which pulls in the &lsquo;layout&rsquo; template (below). We&#39;re setting a value for the page title, the <code>&#123;st_content&#125;</code> variable holds the body of the entry, and then there&#39;s another <code>&#123;st_side&#125;</code> variable for sidebar content. All fairly straightforward stuff.</p>

<figure class="code">
<pre class="brush: ee">
&#123;!-- Setting proper 404 headers --&#125;
&#123; if segment_2==&quot;404&quot;&#125;&#123;exp:http_header status=&quot;404&quot;&#125;&#123; /if&#125;&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;meta charset=&quot;utf-8&quot;&gt;
	&#123;!-- Using SEO Lite for page titles --&#125;
	&#123;exp:seo_lite use_last_segment=&quot;yes&quot;
		title_postfix=&quot;&#123;embed:postfix&#125;&quot;
		default_title=&quot;&#123;embed:page_title&#125;&quot;
		default_keywords=&quot;&#123;embed:keywords&#125;&quot;
		default_description=&quot;&#123;embed:meta_desc&#125;&quot;
	&#125;
	&#123;!-- Using Minimee for asset minification and combination --&#125;
	&#123;exp:minimee:css&#125;&lt;link rel=&quot;stylesheet&quot; href=&quot;/assets/css/master.css&quot;&gt;&#123;/exp:minimee:css&#125;
	&lt;script src=&quot;/assets/js/LAB.min.js&quot;&gt;&lt;/script&gt;
	&#123;!-- Using our own EE #RWD add-on for setting a screensize variable --&#125;
	&#123;exp:ress:cookie&#125;
	&#123;!-- Can inject code into the header from individual posts in the blog --&#125;
	&#123;exp:stash:get name=&quot;st_code&quot;&#125;
&lt;/head&gt;
&lt;body class=&quot;&#123;embed:body_class&#125;&quot;&gt;
	&lt;div class=&quot;header&quot; id=&quot;header&quot;&gt;
		&hellip;
	&lt;/div&gt;
	&lt;div id=&quot;content&quot;&gt;
		&#123; if &#123;exp:stash:not_empty name=&quot;st_page_title&quot;&#125;&#125;&lt;h1&gt;&lt;span class=&quot;wrap&quot;&gt;&#123;exp:stash:get name=&quot;st_page_title&quot;&#125;&lt;/span&gt;&lt;/h1&gt;
		&#123; /if&#125;
		&lt;div class=&quot;wrap row&quot;&gt;
			&lt;div role=&quot;main&quot; class=&quot;main&quot;&gt;
				&#123;exp:stash:get name=&quot;st_content&quot;&#125;
			&lt;/div&gt;
			&#123; if &#123;exp:stash:not_empty name=&quot;st_side&quot;&#125;&#125;&lt;div role=&quot;complementary&quot; class=&quot;aside&quot;&gt;
				&#123;exp:stash:get name=&quot;st_side&quot;&#125;
			&lt;/div&gt;
			&#123; /if&#125;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;footer role=&quot;contentinfo&quot;&gt;
		&hellip;
	&lt;/footer&gt;
	&#123;exp:minimee:js&#125;&#123; if embed:js_off!=&quot;true&quot;&#125;&lt;script src=&quot;/assets/js/site.js&quot;&gt;&lt;/script&gt;&#123; /if&#125;
	&#123;/exp:minimee:js&#125;
	&#123;!-- Can inject code here too --&#125;
	&#123;exp:stash:get name=&quot;st_code_ft&quot;&#125;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<figcaption>The embedded &lsquo;layout&rsquo; template</figcaption></figure>

<p>This is the template that forms the framework for the whole site, containing the global elements &mdash; header and footer, with conditionals in some places to include different things on different pages. There&#39;s comments included in the code above to describe some of what&#39;s going on.</p>

<h3>Portfolio</h3>

<p>The carousel displaying recent projects appears on the home page and also at the top of every portfolio detail page. To keep the templates DRY and also improve performance by cacheing the output, I&#39;m <a href="https://github.com/croxton/Stash/blob/dev/docs/working_with_files.md">saving a Stash as a file</a>, in this case <code>carousel.html</code> which contains:</p>

<figure class="code">
<pre class="brush: ee">
&#123;exp:channel:entries channel=&quot;portfolio&quot; search:p_detail=&quot;=y&quot; disable=&quot;member_data|pagination|trackbacks&quot; dynamic=&quot;no&quot;&#125;
&lt;li class=&quot;touchcarousel-item&quot;&gt;
	&lt;a class=&quot;item-block&quot; href=&quot;&#123;url_title_path=portfolio/view&#125;/&quot;&gt;
		&#123;exp:ce_img:single src=&quot;&#123;p_thumbnail&#125;&quot; width=&quot;150&quot; attributes=&#39;alt=&quot;&quot;&#39;&#125;
		&#123;title&#125;
	&lt;/a&gt;
&lt;/li&gt;
&#123;/exp:channel:entries&#125;
	</pre>
<figcaption>The contents of <code>carousel.html</code></figcaption></figure>

<p>And it&#39;s then pulled into the different templates with:</p>

<figure class="code">
<pre class="brush: ee">
&#123;exp:stash:get
	name=&quot;carousel&quot;
	scope=&quot;site&quot;
	file=&quot;yes&quot;
	save=&quot;yes&quot;
	refresh=&quot;60&quot;
	replace=&quot;no&quot;
	output=&quot;yes&quot;
	parse_tags=&quot;yes&quot;
&#125;
	</pre>
<figcaption>The tag that calls <code>carousel.html</code> from the Stashes folder</figcaption></figure>

<p>I should fess up and admit that performance-wise, in terms of the number of queries and the time taken to load the page, using the above method works out pretty much the same as if I&#39;d used a snippet and added <code>cache=&quot;yes&quot; refresh=&quot;60&quot;</code> to the channel entries tag, but I&#39;ll be looking at this method in the future and comparing it against embeds and snippets to see if it performs better in different situations.</p>

<p>Another thing that Stash is very handy for is inserting blocks of content from one channel in between blocks of content from other channels. For instance on the portfolio detail pages, I list the details of the project followed by a related testimonial, and then the images associated with the project. Without Stash, I&#39;d either need to use an embed or two separate channel entries tags. With Stash I can do this:</p>

<figure class="code">
<pre class="brush: ee">
&#123;exp:channel:entries channel=&quot;testimonials&quot; url_title=&quot;&#123;segment_3&#125;&quot; dynamic=&quot;no&quot; disable=&quot;categories|member_data|pagination|trackbacks&quot;&#125;

	&#123;exp:stash:set name=&quot;st_testimonial&quot;&#125;

		&lt;blockquote&gt;
			&#123;quote&#125;
		&lt;/blockquote&gt;

	&#123;/exp:stash:set&#125;

&#123;/exp:channel:entries&#125;

&#123;exp:channel:entries channel=&quot;portfolio&quot; limit=&quot;1&quot; require_entry=&quot;yes&quot; disable=&quot;member_data|pagination|trackbacks&quot;&#125;

	&#123;exp:stash:set name=&quot;st_content&quot;&#125;

		&lt;h1&gt;&#123;title&#125;&lt;/h1&gt;

		Project details&hellip;

		&#123;exp:stash:get name=&quot;st_testimonial&quot;&#125;

		Project images&hellip;

	&#123;/exp:stash:set&#125;

&#123;/exp:channel:entries&#125;
	</pre>
<figcaption>The portfolio view template</figcaption></figure>

<p>One other thing not related to Stash going on in this template worth pointing out is how I&#39;m dealing with the issue of responsive images. I&#39;m using an add-on I developed, <a href="https://github.com/tyssen/ress-ee">RESS-ee</a> which creates a variable based on your screensize which you can then use with conditionals in your templates to serve up different sized images or even blocks of content.</p>

<figure class="code">
<pre class="brush: ee">
&#123; if ress&gt;768&#125;
	&#123;exp:ce_img:pair src=&quot;&#123;image&#125;&quot; max_width=&quot;800&quot;&#125;
	&lt;img src=&quot;&#123;made&#125;&quot; alt=&quot;&#123;title&#125; website screenshot&quot; width=&quot;&#123;width&#125;&quot; height=&quot;&#123;height&#125;&quot;&gt;
	&#123;/exp:ce_img:pair&#125;
&#123; /if&#125;
&#123; if ress&lt;=768&#125;
	&#123;exp:ce_img:pair src=&quot;&#123;image&#125;&quot; max_width=&quot;&#123;ress&#125;&quot;&#125;
	&lt;img src=&quot;&#123;made&#125;&quot; alt=&quot;&#123;title&#125; website screenshot&quot; width=&quot;&#123;width&#125;&quot; height=&quot;&#123;height&#125;&quot;&gt;
	&#123;/exp:ce_img:pair&#125;
&#123; /if&#125;
	</pre>
<figcaption>Serving up different sized images using RESS-ee</figcaption></figure>

<p>So if your screen is wider than 768 pixels, you get an image whose width is limited to 800 pixels, and if it&#39;s under that, the image is sized to whatever size your screen is, i.e. the value of the <code>&#123;ress&#125;</code> variable. The image will be displayed a bit smaller than that due to padding, but I don&#39;t think the difference is enough to worry about adding more processing overhead and adding another plugin to do mathmetical calculations on the <code>&#123;ress&#125;</code> variable.</p>

<p>So that&#39;s some Stash goodies being used on this site. I&#39;m going to follow up with another post about some I&#39;ve been using on other projects recently, but feel free to share some of yours in the comments.</p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/cms/the-redesign-details-expressionengine/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=the&#45;redesign&#45;details&#45;expressionengine">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2012-09-18T06:36+00:00</dc:date>
</item>

<item>
<title>Relaunch Special</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/news/relaunch-special/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=relaunch&#45;special</link>
<guid>http://www.tyssendesign.com.au/articles/news/relaunch-special/#When:14:00?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=relaunch&#45;special</guid>
<description>
<![CDATA[
<article>
<p>To celebrate the relaunch of the site, we&#39;re running a special during September. Anyone who books any type of work, whether it be some site maintenance or updates, a redesign, or a completely new site (feel free to pass the message on to people you know as well) before the end of September will receive a 20% discount (up to a maximum of $500).*</p>

<h2>ExpressionEngine upgrades</h2>

<p>If you have a site with a Content Management System (CMS) that we have created for you, it&#39;s likely that the CMS is ExpressionEngine. If your current site is older than 18 months, then its likely you&#39;re using version 1.6+ of ExpressionEngine.</p>

<p>A new version of ExpressionEngine, version 2, has been out for a couple of years now and official support for the 1.6+ version ends later this year, so now is the time to upgrade.&nbsp;Your site will continue to function just as well as it does now if you stay with the older version, but reasons why you should upgrade include:</p>

<ul>
	<li>It is always recommended to stay as up to date as possible with your CMS to make sure it has the latest security patches and updates.</li>
	<li>All the latest features and technologies are now being developed for the new version. If you have a new feature you want to add, chances are it won&#39;t be possible with the older version.</li>
	<li>As mentioned before, official support from the makers of ExpressionEngine ends later this year.</li>
</ul>

<p>If you&#39;d like to book an upgrade, take advantage of our special and do it before the end of September.</p>

<p>To make a booking and receive the discount, please <a href="/contact/">email us</a> with <em>Relaunch Special</em> in the body of the message.</p>

<p><small>*The work only has to be booked some time in September. Depending on scheduling, the work may not be completed during the month.</small></p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/news/relaunch-special/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=relaunch&#45;special">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2012-08-31T14:00+00:00</dc:date>
</item>

<item>
<title>Have you done something different with the place?</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/news/have-you-done-something-different-with-the-place/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=have&#45;you&#45;done&#45;something&#45;different&#45;with&#45;the&#45;place</link>
<guid>http://www.tyssendesign.com.au/articles/news/have-you-done-something-different-with-the-place/#When:12:49?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=have&#45;you&#45;done&#45;something&#45;different&#45;with&#45;the&#45;place</guid>
<description>
<![CDATA[
<article>
<p>
	Why yes we have, thanks for noticing. After about six years, several attempts including a couple of false starts, and some that only got part of the job done, this site has finally been redesigned.&nbsp;Tyssen Design is now in its third incarnation since having first launched in 2005 (you can see screenshots of the previous two versions below), and the biggest changes are making the site mobile friendly (which has come to be known as <a href="http://en.wikipedia.org/wiki/Responsive_Web_Design">Responsive Web Design</a>), completely overhauling and enhacing the portfolio, pushing the boundaries of what can be done with CSS instead of images, and finally making the whole thing run on <a href="/web-design-services/expressionengine/">ExpressionEngine</a> (EE).</p>

<p>
	It is said that the old saying &lsquo;the cobbler&#39;s children have no shoes&rsquo; is often quite relevant for web designers/developers and their sites, with those in the business either being too busy working on other people&#39;s websites to have time for their own, or being too critical of their own work to ever be satisfied when they do find some time, and that&#39;s certainly been the case here too.</p>
<p>
	After having thought about it for some time, the first tentative steps towards actually doing something began in January 2010. That first step was to install ExpressionEngine. I&#39;d already been using EE for several years by then, using it for the majority of the work that I do for clients, but the site was still running on Wordpress which was introduced at the time of the previous redesign in 2006.</p>
<figure>
	<span class="shadow"><img alt="Screenshot of version 1 of the Tyssen Design website" height="1304" src="http://www.tyssendesign.com.au/uploads/img/td_v1.png" width="787" /></span> <figcaption>Version 1 of this website from 2005</figcaption></figure>
<figure>
	<span class="shadow"><img alt="Screenshot of version 2 of the Tyssen Design website" src="http://www.tyssendesign.com.au/uploads/img/td_v2.png" width="1020" /></span> <figcaption>Version 2 of this website from 2006 which was powered by Wordpress initially</figcaption></figure>
<p>
	The story over the next two and a half years (with numerous periods when I was too busy with client work to do anything on it) went something like this:</p>
<ul>
	<li>
		Analyse the site content to see what should stay, go or be rewritten.</li>
	<li>
		Create site&nbsp;wireframes.</li>
	<li>
		Don&#39;t get anything done for seven months.</li>
	<li>
		Upgrade EE to version 2 (a major process since version 2 was a complete rewrite of the CMS).</li>
	<li>
		Update&nbsp;HTML for some pages including HTML5 tags that weren&#39;t around when the previous design was done, and toss&nbsp;around a lot of different ideas about what I wanted to do with the site and how it should work.</li>
	<li>
		Start&nbsp;work&nbsp;on some designs, but get discouraged by nothing coming out right and put it aside&nbsp;for a while.</li>
	<li>
		Take a completely different tack to blow out the design cobwebs, and start work on my <a href="http://www.johnfaulds.com.au/">personal blog</a>&nbsp;instead.</li>
	<li>
		Update most of this site to work with EE first (except for the blog which remained on Wordpress because there was a lot of content to import and convert) so that both the new blog and this site could be run from the same installation of EE using the Multi-Site Manager.</li>
	<li>
		The new blog goes live in June last year.</li>
	<li>
		A busy period of publishing articles on the new site follows.</li>
	<li>
		Don&#39;t get anything done for another seven months.</li>
	<li>
		Import the rest of the blog content from Wordpress into ExpressionEngine and also migrate comments to Disqus.</li>
	<li>
		Redesign the logo for the site.</li>
	<li>
		Send out a survey to clients asking for feedback on their experience in dealing with us in the past. Some of this would find its way into a second rewriting of the site content that would soon follow.</li>
	<li>
		Redo site wireframes.</li>
	<li>
		Finally come up with the basis for a design of the site that I&#39;m happy with (just header and footer).</li>
	<li>
		Work out grids and code up foundational HTML and CSS.</li>
	<li>
		Design the rest of the sections of the site one by one in the browser.</li>
	<li>
		Browser testing including mobiles and informal user testing.</li>
</ul>
<p>
	And so that brings us to today with the public launch of the new design. I hope you like it. If you don&#39;t, or have noticed something that doesn&#39;t work quite right or that could be improved, please let me know in the comments (oh, feel free to let me know if you like/love it too ;)</p>
<p>
	I hope to write one or two more articles detailing some more of the specifics involved in different aspects of the redesign process, so if you have an interest in design and development sort of topics, subscribe to the <a href="/articles/feed/">feed</a> or follow me on <a href="http://twitter.com/tyssen">Twitter</a> for updates.</p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/news/have-you-done-something-different-with-the-place/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=have&#45;you&#45;done&#45;something&#45;different&#45;with&#45;the&#45;place">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2012-08-25T12:49+00:00</dc:date>
</item>

<item>
<title>I&#8217;ve got a new blog!</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/news/ive-got-a-new-blog/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=ive&#45;got&#45;a&#45;new&#45;blog</link>
<guid>http://www.tyssendesign.com.au/articles/news/ive-got-a-new-blog/#When:03:25?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=ive&#45;got&#45;a&#45;new&#45;blog</guid>
<description>
<![CDATA[
<article>
<p>
	It&#39;s been a while since I wrote anything on this blog and it&#39;s possible that this may be the last post here because from now on I intend to do most of my writing at my new blog. This site is due for a redesign but the first part in that strategy involved setting up a new site. If that doesn&#39;t make much sense, please read the first post on the new site in which I explain my reasoning.</p>
<p>
	I&#39;m not ruling out entirely ever writing articles on this site in the future, but it won&#39;t be until after the site has been redesigned and I don&#39;t have an exact timeline for that right now. So in the meantime, if you&#39;ve bookmarked or subscribed to the feed for this site, you might like to do the same for the new one too.</p>


</article>
<p><a href="http://www.tyssendesign.com.au/articles/news/ive-got-a-new-blog/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=ive&#45;got&#45;a&#45;new&#45;blog">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2011-07-05T03:25+00:00</dc:date>
</item>

<item>
<title>Adding a link list to TinyMCE with ExpressionEngine</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/cms/adding-a-link-list-to-tinymce-with-expressionengine/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=adding&#45;a&#45;link&#45;list&#45;to&#45;tinymce&#45;with&#45;expressionengine</link>
<guid>http://www.tyssendesign.com.au/articles/cms/adding-a-link-list-to-tinymce-with-expressionengine/#When:21:36?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=adding&#45;a&#45;link&#45;list&#45;to&#45;tinymce&#45;with&#45;expressionengine</guid>
<description>
<![CDATA[
<article>
<p>
	Yesterday I was working on the planning of a new site to be built with <a href="/web-design-services/expressionengine/">ExpressionEngine</a> and was wondering about the best way to let editors link to other entries from within the body of an entry they&#39;re creating or editing. ExpressionEngine doesn&#39;t have this sort of functionality built into it by default so I <a href="http://twitter.com/tyssen/status/3872677237">asked on Twitter</a> to find out if anyone knew of any add-ons that had been created that might do this.</p>

<p>
	One of the replies I got from <a href="http://twitter.com/ebarstad">Eric Barstad</a> mentioned <a href="http://www.electricputty.co.uk/epeditor/?p=41">epEditor</a> which does indeed include this functionality. epEditor also has its own built-in <a href="/articles/cms/file-and-image-management-plugins-for-tinymce/">image and file manager</a> but I don&#39;t really like some of its <abbr title="Hyper Text Markup Language">HTML</abbr> output and there&#39;s no documentation that goes with it so I don&#39;t know if it can be configured to change this or any other settings. It seems that the internal linking feature if only available if you&#39;re also using the <a href="http://buildwithstructure.com/">Structure</a> module.</p>
<p>
	I have used Structure on more than one occasion, but I don&#39;t use it exclusively, so I began thinking about whether it would be possible to achieve what I wanted with the <abbr title="What You See Is What You Get">WYSIWYG</abbr> editor I usually use, <a href="http://tinymce.moxiecode.com/">TinyMCE</a>. Then I remembered about the <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/external_link_list_url">External Link List URL</a> option which does in fact allow you to provide a list of links that editors can insert into their content. Configuring TinyMCE was fairly simple, so then it was just a question of working out how to get ExpressionEngine to output a list of links that TinyMCE could read.</p>
<h2>
	The process</h2>
<p>
	First you need to tell TinyMCE which file contains the array of links to include. These days I&#39;m exclusively using either the LG TinyMCE 2 or <a href="http://wiseup.ru/expressionengine/extensions/mx-tinybrowser-field.html">MX TinyBrowser</a> (with TinyMCE support) <a href="http://brandon-kelly.com/fieldframe">Fieldframe</a> fieldtypes for creating WYSIWYG areas. Both include a tinymce_config folder where you can create different configuration files which feature different buttons, size, appearance etc. According to the TinyMCE Wiki documentation, you add the following to your javascript configuration file:</p>
<pre class="brush: js">
external_link_list_url : &quot;myexternallist.js&quot;</pre>
<p>
	To get a list or links from within ExpressionEngine, the path to <code>myexternallist.js</code> needs to be changed to a template on your site. So first we need to create that template. For my example, I&#39;m creating a template group called <code>tinymce</code> which will contain an index template file. By default, when creating a new template group, ExpressionEngine will populate that folder with an index page saved as a &#39;web page&#39;. So the first thing to do after having created the template group is to select the preferences for that group where you can change the type of the index template from <em>web page</em> to <em>javascript</em>. You&#39;ll also want to allow PHP to be parsed in the template (and leave the parsing stage as <em>output</em>).</p>
<p>
	(It should be noted that if you save your templates as files, as I do, even though you&#39;ve selected <em>javascript</em> as the type, the file will be saved with a .php extension.)</p>
<p>
	Next you&#39;ll want to add some ExpressionEngine code to your template to retrieve the list of entries that you want to appear in the link list.</p>
<pre class="brush: php">
&lt;?php
header('Content-type: text/javascript');
print "var tinyMCELinkList = new Array(";
?&gt;
&#123;exp:weblog:entries weblog="site" disable="categories|member_data|pagination|trackbacks" dynamic="off"&#125;
["{title}", "http://www.tyssendesign.com.au/{url_title}"]&#123;if count != total_results},&#123;/if}
&#123;/exp:weblog:entries&#125;

&lt;?php
print ");";
?&gt;</pre>
<p>
	In my example, I&#39;ve selected a weblog called <em>site</em> which I usually use for static, stand-alone pages (i.e. not part of another section) so the <abbr title="Uniform Resource Identifier">URI</abbr> for these pages is always <code>site_name / url_title</code>, but if you want to populate your list with links from other sections too, you&#39;d just add more <code>exp:weblog:entries</code> tags with each one outputting a slightly different path. If you do use more than one <code>exp:weblog:entries</code> tag, you&#39;d leave <code>&#123;if count != total_results&#125;,&#123;/if&#125;</code> until the very last one, because this is to add a comma to the end of every line except for the very last one.</p>
<p>
	You can test that the template is outputting in the correct format by viewing it directly in the browser. It should output in this format:</p>
<pre class="brush: js">
var tinyMCELinkList = new Array(
// Name, URL
[&quot;Link 1&quot;, &quot;http://www.example1.com&quot;],
[&quot;Link 2&quot;, &quot;http://www.example2.com&quot;],
[&quot;Link 3&quot;, &quot;http://www.example3.com&quot;]
);
</pre>
<p>
	Then you just need to edit your TinyMCE config file so that it has the correct path, so in my example it would be <code>/index.php/tinymce/index.js</code>.</p>
<p>
	If you&#39;ve followed everything correctly, you should have a <em>Link List</em> dropdown appear in the link popup window below the <em>Link URL</em> field when publishing or editing an entry. If there a lot of entries, the dropdown will be one big long list which isn&#39;t very usable, but you could perhaps make it easier to differentiate between items by adding the name of the weblog or section at the beginning. And it&#39;s certainly better than asking the editor to copy and paste a link.</p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/cms/adding-a-link-list-to-tinymce-with-expressionengine/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=adding&#45;a&#45;link&#45;list&#45;to&#45;tinymce&#45;with&#45;expressionengine">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2009-09-15T21:36+00:00</dc:date>
</item>

<item>
<title>Redesigning ExpressionEngine sites</title>
<dc:creator>John Faulds</dc:creator>
<link>http://www.tyssendesign.com.au/articles/cms/redesigning-expressionengine-sites/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=redesigning&#45;expressionengine&#45;sites</link>
<guid>http://www.tyssendesign.com.au/articles/cms/redesigning-expressionengine-sites/#When:00:55?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ArticleTitle&amp;utm_campaign=redesigning&#45;expressionengine&#45;sites</guid>
<description>
<![CDATA[
<article>
<p>
	With <a href="/web-design-services/expressionengine/">ExpressionEngine</a> you give your clients a lot of power and flexibility to update the content of their own site, but at some point in a site&#39;s life there&#39;s going to come a time when changes will be required that the site owner or his/her staff can&#39;t do themselves via the control panel. Changes to a logo or other graphical elements of the site, adding new sections or functionality, giving the site a new &#39;skin&#39; or theme, or completely rebuilding from the ground up will require a designer of developer to get involved.</p>

<p>
	I&#39;m not going to discuss the processes involved in creating a new site design (although I might do one day when I get around to redesigning this site; in the meantime <a href="http://erskinelabs.com/post/the-erskine-redesign-behind-the-scenes-part0-introduction/">Erskine Design</a> have an interesting series of articles discussing their redesign), but rather how you go about implementing that redesign into your current ExpressionEngine site.</p>
<p>
	The different types of redesign you might need to implement could include:</p>
<ul>
	<li>
		changing a single element common to all pages (or a section of pages)</li>
	<li>
		changing a single element on just one page</li>
	<li>
		changing the layout of an entire page or section</li>
	<li>
		changing the design of an entire site</li>
</ul>
<p>
	And there&#39;s different ways you could approach to making the changes to the site:</p>
<ul>
	<li>
		develop locally or on a different server or subdomain and then transfer to the live server</li>
	<li>
		create additional templates and/or template groups</li>
	<li>
		use conditionals within existing templates</li>
</ul>
<p>
	I&#39;ve used all three of the above methods and don&#39;t really have a particular favourite; each is better suited to different situations. So let&#39;s look at what some of those situations might be.</p>
<h2>
	Developing locally / on a different server or subdomain</h2>
<p>
	I&#39;ve only used this in situations where I knew I was going to have to make changes to more than just templates, i.e, weblogs, categories and in some cases, entries; the sort of changes that can&#39;t be implemented on a live site until everything is ready to go and has been approved.</p>
<p>
	In most cases, if you&#39;re going to use a separate server or subdomain (with its own separate database) for previewing the changes to the site owners, you probably wouldn&#39;t bother developing locally as well, as then you&#39;d have to transfer things twice. But I&#39;ve been involved with one redesign that wasn&#39;t a visual redesign, one that could be noticed by site visitors, but rather a redesign of templates to make them more flexible, to cope with the changing nature of the content that had developed since the site&#39;s launch.</p>
<p>
	I exported a copy of the live site&#39;s database to work on locally, made all the changes to templates and database structure locally one section at a time and then recreated the changes on the live server. This redesign was really more about making <em>my</em> job easier in terms of maintenance and so didn&#39;t require the site owners to preview the changes as, from their point of view, there were no changes &ndash; they still created their content in much the same way and the public site looked no different.</p>
<p>
	That project was a bit of a special case and usually I&#39;d recommend just developing on a server that the site owner can preview changes on. The process would still be the same though. The problem with this method is that if you&#39;re working on a site that is updated regularly you can&#39;t just reimport your version of the database into the live database (after having made a back-up first!) as there will likely have been new content added since you first exported it. If you&#39;re a MySQL whiz, you might be able to create scripts to automatically merge your changes with the live database, but I&#39;m not so find it easier to just recreate whatever changes I&#39;ve made to template groups, weblogs, categories, entries etc. on the live site via the control panel after I&#39;ve tested they were work correctly on the test site. The few times I&#39;ve had to do this the changes of this nature have been pretty minor anyway, so it&#39;s not been an issue.</p>
<h3>
	Developing on a subdomain using the same database</h3>
<p>
	I&#39;ve not had to go down this route myself yet but Jamie Pittock from Erskine Design gives a good explanation of how to <a href="http://erskinelabs.com/post/create-an-alternative-version-of-your-expressionengine-website/">Create an alternative version of your ExpressionEngine website</a> using a subdomain which accesses the same database as the main site. This method involves creating additional templates which I&#39;ll discuss next.</p>
<h2>
	Create additional templates and/or template groups</h2>
<p>
	If you&#39;ve now read Jamie&#39;s article, you&#39;ll have one way in which you can use new templates in conjuction with a subdomain for previewing changes to a site&#39;s design. But you can also use new templates within your existing domain too. For instance, if you&#39;re creating a new design for the home page and your current home page template is /home/index/, you could create a new template in this group, e.g. /home/preview/ and set its access privileges to be viewable only by certain member groups, i.e., you&#39;d have to be logged in. Or you could create a completely new template group, e.g. /home-new/ for the same purpose (again restricting access to logged in users).</p>
<p>
	If you&#39;re redesigning a section that has more than one template in it, you&#39;d probably be better off creating a new template group because then you could copy all the template files to the new group and when you&#39;re ready to push the changes live, just delete the old group and rename the new one. If you stuck to using one template group with differently-named files, you might end up with a lot more files to rename. Of course, if you&#39;re creating a whole new section with all new content (or maybe repurposed content), then a new template group would be mandatory.</p>
<p>
	If your redesign involves reworking embedded templates that the rest of the site uses then you&#39;ll probably need to create a new template group for these two. Or you could get creative with a few conditionals, e.g.: <code>{<span class="hide"> </span>if segment_1 == &quot;preview&quot;} show new design elements {<span class="hide"> </span>if:else} show the current design&#39;s elements {<span class="hide"> </span>/if}</code>. Which brings me to the next method:</p>
<h2>
	Use conditionals within existing templates</h2>
<p>
	This is the method I used for the most recent ExpressionEngine redesign I did. I was thinking originally about using a subdomain, but the site is a fairly simple brochure site promoting services and most of the templates were exactly the same except for the weblog entries being displayed. So to make the templates a bit more readable I first created an embed which contained the bulk of each template, and then reworked the existing templates to look something like this:</p>
<pre class="brush: ee">
&#123;if logged_in}New template code goes here.&#123;if:else} &#123;embed=&quot;embeds/.content&quot; weblog=&quot;{segment_1&#125;&quot;}&#123;/if}</pre>
<p>
	I created a new template group for the new embeds I was going to create so it didn&#39;t clash with the current design&#39;s embeds. Doing it this way meant that only me and the site owners would see the new design while everyone else would see the old one. As it was only a simple site with only two active member groups &ndash; admins and editors &ndash; <code>{<span class="hide"> </span>if logged_in}</code> was all I needed but if the site had more complex member structure, then you&#39;d use the <code>{<span class="hide"> </span>if member_group}</code> conditional instead.</p>
<p>
	So that&#39;s the way I&#39;ve approached redesigning ExpressionEngine sites in the past. I&#39;m sure there&#39;s some out there who probably use <a href="http://www.experienceinternet.co.uk/blog/archive/using-git-with-expressionengine-part-1/">version-control systems like Git</a>, but I haven&#39;t quite gotten around to working with Git yet. What&#39;s been your method?</p>

</article>
<p><a href="http://www.tyssendesign.com.au/articles/cms/redesigning-expressionengine-sites/?utm_source=Teasers&amp;utm_medium=RSS&amp;utm_content=ContinueReading&amp;utm_campaign=redesigning&#45;expressionengine&#45;sites">Read full entry &rarr;</a></p>
]]>
</description>
<dc:subject>Tyssen Design Blog</dc:subject>
<dc:date>2009-08-21T00:55+00:00</dc:date>
</item>

</channel>
</rss>