<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title type="text"><![CDATA[Blog]]></title>
	<subtitle type="text"><![CDATA[Blog]]></subtitle>
	<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk//index.php/blog" />
	<link rel="self" type="application/atom+xml" href="http://www.designkarma.co.uk/blog/atom" />
	<updated>2012-03-26T19:58:59Z</updated>
	<rights>Copyright 2012</rights>
	<generator uri="http://expressionengine.com/" version="2.3.0">ExpressionEngine</generator>
	<id>tag:http://www.designkarma.co.uk/,2012:03:26</id>
	
	<entry>
		<title><![CDATA[Featured in Campaign Monitor Blog]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/featured-in-campaign-monitor-blog" />
		<id>tag:http://www.designkarma.co.uk/,2012:index.php/blog/2.100</id>
		<published>2012-03-26T18:54:58Z</published>
		<updated>2012-03-26T19:58:59Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>Nice to see the DesignKarma Christmas email featured in the Campaign Monitor blog today. Not bad, considering this was only my second &#8220;responsive&#8221; email design.</p> <p>Read more at: <a href="http://www.designkarma.co.uk/?URL=http%3A%2F%2Fwww.campaignmonitor.com%2Fgallery%2Fentry%2F3670%2Fdesignkarma%2F">http://www.campaignmonitor.com/gallery/entry/3670/designkarma/</a></p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[Going Truly &#8220;Adaptive&#8221; With ExpressionEngine]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/going-truly-adaptive-with-expressionengine" />
		<id>tag:http://www.designkarma.co.uk/,2012:index.php/blog/2.99</id>
		<published>2012-03-08T10:40:16Z</published>
		<updated>2012-03-08T11:17:17Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>I like simple. That’s why my current approach to designing and building “adaptive” or “responsive” ExpressionEngine sites avoids add-ons, subdomains, redirects or Javascript. Moreover, I&#8217;ve been focussing on delivering a truly adaptive experience that goes beyond CSS media queries. So, if you’re a newbie looking for an easy way to take your adaptive websites to the next level, give this a try.</p> <h2>CSS media queries. Good but not great</h2>

<p>Initially for me, “adaptive” was all about showing, hiding and manipulating elements using CSS3 media queries for different resolutions. Definitely a step in the right direction. The big problem with this approach alone though is that end users (I’m thinking specifically of smart phone users on slow data connections) still have to download an entire page – including the hidden elements. Doesn’t sound very adaptive to me. We can do better right?</p>

<h2>Global variables to the rescue</h2>

<p>I use a device detection script to set a global variable of “full” or “mobile”. Try adding the following to your <i>config.php</i>:</p>

<pre><code>global $assign_to_config;
if( ! isset($assign_to_config['global_vars']))
{
	$assign_to_config['global_vars'] = array();
}

$useragent = $_SERVER['HTTP_USER_AGENT']; // Let's do some device detection
if (preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
$master_global = array(
	'global:site_version'      => 'mobile'
);
else
$master_global = array(
	'global:site_version'      => 'full'
);

$assign_to_config['global_vars'] = array_merge($assign_to_config['global_vars'], $master_global); // global var arrays
$config = array_merge($config); // config setting arrays
</code></pre>

<p><i><small>Learn more about config setup by downloading <a href="https://github.com/focuslabllc/ee-master-config">Focus Lab’s Master Config Setup</a>.</small></i></p>

<p>Now we can get seriously adaptive. Instead of that long horizontal navigation menu you’re using for desktop users, how about a simple dropdown (select) form for mobile users? Create two snippets – <code>{sn_menu_full}</code> and <code>{sn_menu_mobile}</code> – and pop your horizontal menu in the first one; your dropdown in the second. Now, in your template just add:</p>

<pre><code>{sn_menu_{global:site_version}}</code></pre>

<p>Because global variables are parsed early, <code>{global:site_version}</code> will be replaced with either “full” or “mobile”, and your template will just display the appropriate snippet.</p>

<p>You can use conditionals too.</p>

<pre><code>&#123;if global:site_version=='full'&#125;
Add some extra markup that you only want desktop users to see.
&#123;/if&#125;</code></pre>

<p>These are just two examples, but you can probably begin to imagine all the adaptive fun you can have!</p>

<p>You don’t need a suite of devices to test your adaptiveness either. For a quick peek at your mobile site just resize your browser window, open <i>config.php</i> and change <code>&#8216;global:site_version&#8217; => &#8216;full&#8217;</code> to <code>&#8216;global:site_version&#8217; => &#8216;mobile&#8217;</code>.</p>

<h2>How do you roll?</h2>

<p>As always, I’d love the community’s thoughts on this approach, and how they’re currently tackling the adaptive web. Please don’t think any of this applies to the DesignKarma website! As is always the case, this website languishes whilst I’m busy applying the latest technologies and techniques to client sites. I know, I know, poor excuse&#8230;</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[Granular SEO in ExpressionEngine]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/granular-seo-in-expressionengine" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.98</id>
		<published>2011-10-05T14:13:43Z</published>
		<updated>2011-10-05T12:14:44Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<content type="html"><![CDATA[
			<p>There’s been a lot of talk lately about <a href="http://expressionengine.com/blog/entry/outstanding_search_engine_optimization_with_expressionengine">ExpressionEngine and SEO</a> (search engine optimisation), and I thought I’d share something simple that’s been working quite well for my EE clients for some time now. The objective is to give them more granular control over individual pages; and allow them to experiment and fine-tune over time.</p> <p>All of this has to be practical. SEO is a time-consuming and complex activity, and clients are busy people right? So it’s important to arm them with enough tools to make a difference, but also be realistic about what they can manage, given limited time and understanding.</p>

<h2>Going native</h2>

<p>There are a number of good <a href="http://devot-ee.com/search/results/search&amp;keywords=SEO&amp;channel=addons&amp;addon_version_support=ee2/">SEO-focussed EE add-ons</a> available, but the minimalist in me likes to avoid add-ons when I can achieve what I need natively in EE. Custom fields are all I need, and I group them under their own “SEO” tab in publish layouts, along with useful instructions for clients.</p><figure><img src="http://www.designkarma.co.uk/images/uploads/expressionengine-seo.jpg" alt="SEO in the ExpressionEngine Control Panel" height="430" width="602"><figcaption>Custom SEO tab in ExpressionEngine publish page</figcaption></figure>

<p>I’m not going to explain each of these fields here. There are plenty of SEO resources out there detailing the importance of browser titles, priorities etc&#8230; It’s all very dull I’m afraid.</p>

<h3>Adding it to the mix</h3>

<p>Let’s get these tags into our templates. EE experts can probably skip this, but novices read on. In this example, I’ll use a standard “comments” template displaying a single entry from a news channel. Everything happens in the document &#60;head&#62;.</p>

<pre><code>&#123;preload_replace:my_channel="news"&#125;
&#123;gv_doctype&#125;
&#123;gv_html&#125;

&#123;exp:channel:entries
		channel="&#123;my_channel&#125;" 
		disable="&#123;sn_disable_std&#125;"
		dynamic="yes"
		limit="1"
		require_entry="yes"
	&#125;
&#123;if no_results&#125;&#123;redirect='error'&#125;&#123;/if&#125;
&lt;head&gt;
	&lt;meta charset="&#123;charset&#125;"&gt;
	&lt;title&gt;&#123;if cf_browser_title_en&#125;&#123;cf_browser_title_en&#125;&#123;if:else&#125;&#123;title&#125;&#123;/if&#125; | &#123;site_name&#125;&lt;/title&gt;
	&lt;meta name="description" content="&#123;cf_meta_description_en&#125;"&gt;
&#123;/exp:channel:entries&#125;
	&lt;meta name="author" content="&#123;site_name&#125;"&gt;
	&lt;meta name="copyright" content="Copyright &#123;current_time format='%Y'&#125; &#123;gv_site_owner&#125; All rights reserved."&gt;
	&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
	&lt;link rel="stylesheet" href="/css/styles.css"&gt;
	&lt;link rel="stylesheet" media="screen and (max-width: 480px)" href="/css/handheld.css"&gt;
&lt;/head&gt;</code></pre>

<p>Nothing exceptional here, just a dynamic channel entries tag. The good stuff happens inside the &#60;title&#62; and &#60;meta&#62; description tags where we inject our SEO values. Importantly, since clients sometimes forget to enter a value for Browser Title – tut, tut – we need a fallback. In this case, I’ve got a condition to display the cf_browser_title_en if it has a value, or else just use the entry title.</p>

<p>Note the disable=”{sn_disable_std}” channel parameter, which contains a snippet of the usual disabled channel params – a nice tip I picked up off <a href="http://twitter.com/#!/cwcrawley">Carl Crawley</a> at my recent <a href="http://eeuk.org">EEUK</a> conference.</p>

<p><small>BTW – If you’re wondering what the tags are beginning “gv_” they’re global variables I use to store basic reusable stuff like doctype.</small></p>

<h3>Site map template</h3>

<p>But wait, what about the other SEO tags? Well they’re used in our XML site map template. Linking an XML site map – or maps – to Google Webmaster Tools for example, helps you control how Google crawls and indexes your pages, and gives you a ton of data on how Google sees your site, so you can fine tune accordingly.</p>

<p>Here’s how our SEO tags would look in an XML site map template. Remember to change your template type to “XML” in EE.</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt;
&#123;exp:channel:entries 
		channel="news" 
		disable="&#123;sn_disable_std&#125;" 
		dynamic="no"
	&#125;
	&lt;url&gt;
		&lt;loc&gt;&#123;comment_url_title_auto_path&#125;&lt;/loc&gt;
		&lt;lastmod&gt;&#123;edit_date format='&#123;DATE_W3C&#125;'&#125;&lt;/lastmod&gt;
		&lt;changefreq&gt;&#123;cf_changefreq&#125;&lt;/changefreq&gt;
		&lt;priority&gt;&#123;cf_priority&#125;&lt;/priority&gt;
	&lt;/url&gt;
	&#123;/exp:channel:entries&#125;
&lt;/urlset&gt;</code></pre>

<p>Since we have default values for both Change Frequency (monthly) and Priority (0.5) there’s no need for fallbacks. Now, clients can tell Google how frequently each page needs indexing, and how important/unimportant each page is in the context of the site.</p>

<h3>Wrapping up</h3>

<p>No question that cooking up a high-ranking website involves a very complicated recipe, but the fields I’ve suggested are pretty key ingredients that will make a difference. They combine to give clients greater control over keywords, crawl rates and search result appearance for individual pages.</p>

<p>You could add more fields for meta keywords, canonical, etc&#8230; but again, it’s being realistic about what the client is comfortable with and able to manage. The fields I’ve suggested above are manageable, easy to implement, have had a very positive impact in most cases.</p>

<p>As always, suggestions and comments are very welcome. How do you build granular SEO into EE?</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[EEUK11 is a Wrap]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/eeuk11-is-a-wrap" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.95</id>
		<published>2011-08-29T14:53:36Z</published>
		<updated>2011-08-29T20:55:37Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p><a href="http://eeuk.org">EEUK11</a> – the UK’s first ever national ExpressionEngine conference took place Friday 26th August. It was an affordable one-day conference including seven guest speakers and over 80 delegates, with the aim of bringing the community together to share and learn.</p> <p>As a long-time EE Pro Network developer, I was proud (and a little nervous) to have organised and hosted it. I suppose it’s one way I can give back to a community and organisation (EllisLab) that have given me so much. Either way, here is my account of EEUK11.</p>

<p>Having thoroughly enjoyed trips out to <a href="http://eeciconf.com/">EECI</a> in The Netherlands the last two years, I was disappointed to hear there would be no European ExpressionEngine conference this autumn. Foolishly, I tweeted the idea of a UK EE meet-up this summer, and the response was immediate and very enthusiastic – along with cries of “let us know when you’ve sorted it out.” Ah. Oh dear.</p>

<p>Worse still, what I’d imagined as an informal meet-up in a pub somewhere over sausage rolls and sandwiches, was quickly becoming a full-blown conference, with people asking about guest speakers and posh venues. “Well, how hard can it be?” I thought (naively). I decided to plough on. EEUK was born.</p>

<p>I’ve spent more time than I’d bargained for this summer checking out venues, lining up sponsors, speakers and giveaways, and of course selling tickets. Would it all be worth it?</p>

<h2>EEUK Week</h2>

<p>EEUK week was a blur, with DesignKarma work taking a back seat. The whole thing only really became a reality at 08:30 on Wednesday morning, when I met guest speaker <a href="http://twitter.com/#!/mrsflinger">Leslie Flinger</a> from Seattle. At that point it definitely sunk in. It was really actually happening.</p>

<p>The speakers and I were booked in the Arora Hotel for Thursday and Friday, but Leslie arrived a day early, so stayed with us Wednesday. I had strict instructions from my wife Ali to stall Leslie for an hour while she tidied up after a plumber who’d called that morning to fix our shower that had packed in the day before. Luckily, Leslie needed some breakfast so we headed for a cafe. Driving her around on the left-hand side of the road completely freaked her out! Still, I guess it woke her from her jet lag because she was soon installed at home working on her slides. Until of course, our phone line (and internet) went down. Unbelievable timing, and another bad omen for EEUK! We decamped to my office in Altrincham for the rest of the day. Then it was home for dinner and a few glasses of wine.</p>

<p>Leslie was still in bed Thursday morning as I met another guest speaker at the airport – EllisLab tech support guru <a href="http://twitter.com/#!/johnhenry_ie">John Henry Donovan</a> from Cork. My dining room quickly turned into EEUK HQ with John Henry, Leslie and I working on slides, surrounded by boxes and luggage. My daughter popped in a few times to be nosy and wish me luck in my “assembly”.</p>

<p>After lunch we drove into Manchester and checked in at the Arora. EECI organiser <a href="http://twitter.com/#!/roberteerhart">Robert Eernart</a> was waiting in reception, along with another of my speakers <a href="http://twitter.com/#!/monooso">Stephen Lewis</a>, plus <a href="http://twitter.com/#!/simoncox">Simon Cox</a>. I transferred a ton of gear from car to room, and set off again for the airport. This time to pick up speaker <a href="http://twitter.com/#!/cwcrawley">Carl Crawley</a> and <a href="http://twitter.com/#!/orionesque">Geoff Cowan</a>. I dropped them both in Manchester, drove home to ditch the car, and then hopped on a tram back into town again.</p>

<p>Time for some pre-conference drinks and pizza at Dukes92. <a href="http://twitter.com/#!/joelbradbury">Joel Bradbury</a> and <a href="http://twitter.com/#!/low">Lodewijk Schutte</a> (Low), two more of my speakers were there. Rather impressively, most of my speakers headed back to the hotel early to work on their slides that evening. Discipline, I thought. Either that or they were way behind! I stuck around till 10:30 before heading back and spending an hour or two in my hotel room assembling goodie bags and going over everything.</p>

<p><img src="http://www.designkarma.co.uk/images/uploads/eeuk_strip.jpg" alt="EEUK11 at Manchester Town Hall" width="700" height="175"></p>

<h2>The Morning of EEUK</h2>

<p>I slept pretty well, got up at 07:00, and headed for breakfast with Carl and Joel. Made the mistake of checking Twitter at around 08:00 and read a stream of tweets from attendees on their way, all excited. This thumped home the reality of it all and gave me a brief panic attack.</p>

<p>At 08:30 it was time to head over on foot to the EEUK venue. Thankfully, Carl and John Henry helped me cart a ton of gear over there, saving me 3 or 4 trips. I chose Manchester Town Hall’s Banqueting Room over other venues I’d looked at because of it’s obvious wow factor, but also its’ sense of history, size, shape and natural acoustics.</p>

<p>Ali arrived at about 09:15, with her friend Nic shortly after that. They helped out registering delegates who started arriving much earlier than expected, and we had to bring forward the catering a bit. My remaining speakers arrived, and by 10:15 the coffee room was buzzing, and so were my nerves. John Henry was having trouble with his slides on his MacBook, so we transferred to my MacBook Pro. Some more twiddling was needed, so we agreed to switch him in the running order with Leslie.</p>

<p>At 10:30 everyone started to take their seats in the Banqueting Room. Yikes. What a lot of people! This was all on me. If it bombed, there was no-one else to blame. I took to the stage and welcomed everyone before introducing our first guest speaker, Joel.</p>

<p>Watching Joel, I relaxed and just became part of the audience. I realised I had seven great speakers whom I knew would absolutely smash it. All I had to do was introduce them all and try not to trip up on the stage. Hey, I might even enjoy myself!</p>

<p>During Leslie’s talk I sat over on the side with John Henry, making sure his slides were coming together. I also got to look at the audience, who appeared to be enjoying it. Early tweets suggested that too.</p>

<p>Next up was John Henry’s talk on faceted navigation (using <a href="http://www.solspace.com/docs/addon/c/Super_Search">Solspace Super Search</a> and AJAX). It left everyone with the same though: “Wow, I’ve got to use that on something.”</p>

<p>Then it was time for lunch. The morning session seemed to fly by. Whilst the buffet was being prepared, <a href="http://twitter.com/#!/malcolmwax">Malcolm Elsworth</a> of EEUK sponsors <a href="http://electricputty.co.uk/">Electric Putty</a> demoed their latest EE add-on Better Workflow, and I deployed the BingoTron 2000 (a crummy little bingo machine I borrowed from my daughter!) to draw 5 random license winners. I dished out some more the same way after lunch.</p>

<h2>The Final Push</h2>

<p>It was great to see everyone back in their seats at 2pm on the dot, ready and raring. Stephen Lewis was first up after lunch, with some great add-on development tips. Next was a complex but revealing delve into EE’s parse order from Low, before it was time for some very welcome coffee and cakes. By this stage, I’d relaxed into it, worked out some technical kinks, and was getting some really great feedback from delegates.</p>

<p>After the break, Carl Crawley blew us all away with his talk on optimisation, as well as some bonus material on updating EE with an insane bash script he’d written. EEUK drew to a close with a hot-topic talk from Garret Winder on going mobile with EE. It was short but covered a lot of ground and drew some interesting questions from the audience on duplicate content.</p>

<p>Once Garrett wrapped up, I closed EEUK11 by thanking everyone once again, and directing them to the after-party at the wonderful Sam’s Chop House. Delegates practically ran there and I had to call Ali to tell her to get over there fast and let them know we were early. As it was, the area supposed to be roped off, wasn’t; and it apparently took a little while to clear the area. No harm done though, and everyone was soon in and tucking into the free bar – thanks to our gold sponsor (<a href="http://pixelandtonic.com/">Pixel &amp; Tonic</a>).</p>

<p>I collected up any remaining gear at the Town Hall and took it back to the hotel with some of the speakers, before we all headed over to the Chop House ourselves. That first beer tasted great. The second wasn’t bad either.</p>

<p>I tried to talk with as many delegates as I could, but there wasn’t a great deal of time, and many had to catch trains etc&#8230; Those of us who were out for the night headed to Croma after the Chop House for some pizza, before then taking over The City Arms until last orders. From there, things went downhill. Or rather, downstairs&#8230; to The Tiger Lounge, where us hardcore EEUK’ers partied till about 4am. Highlight for me was watching Leslie and <a href="http://twitter.com/#!/johndwells">John Wells</a> doing a hoe-down to “Dueling Banjos” (eclectic doesn’t even come close to describing that DJ’s playlist).</p>

<h2>EEUK12?</h2>

<p>So that was EEUK, and judging from the response I’ve had and read on Twitter, it went down pretty well. My seven guest speakers dropped some knowledge bombs, venue was great, food was great, after-party was great&#8230;</p>

<p>I was asked many times on Friday and over the weekend whether I’ll do an EEUK12. I must say, I’m in no great hurry to do it all again. It also depends on what happens with EECI Europe next year. I’m glad it went well and everyone enjoyed themselves and found it worthwhile, and that’s good enough for me I think. I’m a web designer, not an event organiser.</p>

<p>Having said that I did actually enjoy it, and the stress is already fading from my memory. Nah, definitely not doing it again. Well, almost definitely not. Well, possibly&#8230;</p>

<p>Thanks again to all who supported and attended! More information, photos and speakers slides can be found at the <a href="http://eeuk.org">EEUK website</a>.</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[DesignKarma Interview on Meta Q]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/designkarma_interview_on_meta_q" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.91</id>
		<published>2011-07-13T07:33:21Z</published>
		<updated>2011-07-13T08:43:22Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>I was recently interviewed for online web design journal <a href="http://themetaq.com/articles/meta-qa-ian-ebden-designkarma">Meta Q</a>. Find out what makes DesignKarma tick, plus why I love ExpressionEngine and web design. Read the full interview at: <a href="http://www.designkarma.co.uk/?URL=http%3A%2F%2Fthemetaq.com%2Farticles%2Fmeta-qa-ian-ebden-designkarma">http://themetaq.com/articles/meta-qa-ian-ebden-designkarma</a></p> ]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[Mike Boyink / EEUK Book Giveaway]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/mike_boyink_eeuk_book_giveaway" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.89</id>
		<published>2011-06-15T14:00:19Z</published>
		<updated>2011-06-15T14:39:21Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>US ExpressionEngine expert <a href="http://boyink.com/">Mike Boyink</a> has kindly donated 5 copies of his new book &#8220;Building an ExpressionEngine 2 Small Business Site&#8221; as giveaways for our upcoming <a href="http://eeuk.org">EEUK</a> conference. To get your free copy, simply register for <a href="http://eeuk.org">EEUK</a> and the next 5 registrants will each receive a copy in the post.</p> <p>EEUK is the UK&#8217;s first national ExpressionEngine conference, being organised by DesignKarma. Having recently worked with Mike on an EE project we&#8217;re thrilled that he&#8217;s supporting this event, along with <a href="http://pixelandtonic.com">Pixel &amp; Tonic</a>, <a href="http://enginesummit.com">Engine Summit</a>, <a href="http://creat-ee.com/">Creat//ee</a> and <a href="http://ellislab.com/">Ellislab</a> so far.</p>

<p>See you there!</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[Creat//ee Giveaway and Discounts]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/creat_ee_giveaway_and_discounts" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.90</id>
		<published>2011-06-09T10:03:38Z</published>
		<updated>2011-06-09T11:11:39Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p><a href="http://creat_ee.com/">Creat//ee</a> are the latest ExpressionEngine enthusiasts to get behind our <a href="http://eeuk.org">EEUK</a> conference, donating a free ticket to their upcoming <a href="http://www.creat-ee.com/classes/more/expressionengine_20_for_beginners">&#8220;ExpressionEngine 2.0 for Beginners&#8221;</a> online class (worth $499), as well as $100 discounts for all EEUK registrants.</p> <p>The next EEUK registrant will get the free ticket, but the discount is available to all other registrants.</p>

<p>So whether you want to hone your ExpressionEngine skills, or you&#8217;re new to the platform, now would be a great time to register for the UK&#8217;s first national ExpressionEngine conference <a href="http://eeuk.org">EEUK</a> where you can learn from and mix with the cream of the UK EE community. You&#8217;ll also get the aforementioned free or discounted seat to the Creat//ee class.</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[Engine Summit Ticket Giveaway]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/engine_summit_ticket_giveaway" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.88</id>
		<published>2011-05-30T14:24:14Z</published>
		<updated>2011-05-30T15:27:15Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>Register for <a href="http://eeuk.org">EEUK</a> before the end of the week and you could win a free ticket to for <a href="http://enginesummit.com">Engine Summit</a> on June 7th. Engine Summit is &#8220;the online, live ExpressionEngine Developer Conference&#8221;, beaming some of the web&#8217;s most notable experts in ExpressionEngine direct to your desktop.</p> <p>We&#8217;ll pick the winner at random on Friday afternoon. All you need to do is <a href="http://eeuk.org">register for EEUK</a>, and you could be adding two EE conferences to your calendar. Good luck!</p>

<p>Special thanks to Christopher at Environments for Humans.</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[EEUK Coming This Summer]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/eeuk_coming_this_summer" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.87</id>
		<published>2011-05-24T12:47:37Z</published>
		<updated>2011-05-24T13:47:38Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<category term="<![CDATA[Site Launches]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/site_launches"
			label="<![CDATA[Site Launches]]>" />
		
		<content type="html"><![CDATA[
			<p>DesignKarma is thrilled to launch tickets today for EEUK&#8212;the UK&#8217;s first ever national ExpressionEngine conference, taking place this August at Manchester Town Hall.</p> <p>We&#8217;ve been organising this event the last couple of months, lining up some star guest speakers and choosing the perfect venue. We&#8217;ve got delegates from all over the UK, as well as some coming over from Europe and the US. It&#8217;s a chance for ExpressionEngineers to meet, mingle with, and learn from the cream of the EE crop in the UK. As a long-standing ExpressionEngine Pro Network member, DesignKarma are well positioned to host this event and further cement our reputation in the UK EE community,</p>

<p>For more information and tickets visit: <a href="http://www.designkarma.co.uk/?URL=http%3A%2F%2Feeuk.org">http://eeuk.org</a></p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[Styling Text with Modernizr, Typekit and CSS3]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/styling_text_with_modernizr_typekit_and_css3" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.84</id>
		<published>2011-04-26T09:52:12Z</published>
		<updated>2011-04-26T11:05:13Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>We recently published a one-page website for the upcoming <a href="http://eeuk.org">EEUK</a>, and a couple of users asked how we managed to style the large “EEUK” headline using only code. Well, it’s easy when you know how&#8230; and here’s how:</p> <p>First off, a disclaimer. The lovely folks attending EEUK will most likely be using the most up-to-date browsers and platforms, so that gave us free reign to use the very latest CSS3 tools. For older browsers, or browsers with less CSS3 support, we’ve just resorted to showing a graphic instead.</p>

<h2>Modernizr, Typekit and CSS3</h2>

<p>One of the keys to this is using the excellent <a href="http://www.modernizr.com/">Modernizr</a> script, which “adds classes to the <code>&lt;html&gt;</code> element which allow you to target specific browser functionality in your stylesheet.” In other words, browsers that support CSS text-shadow will add the .textshadow class to your page.</p>

<p>Let’s look at the actual markup:</p>

<pre><code>&lt;h1 class="tk-league-gothic"&gt;EEUK&lt;/h1&gt;</code></pre>

<p>We’re using <a href="http://typekit.com/">Typekit</a>’s font service to embed the font “League Gothic” via the class “tk-league-gothic”. We enhance the look of that with some shiny new CSS3 tools.</p>

<pre><code>h1 {
	font-size: 2000%;
}
.cssgradients h1 {
	-webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.8)), to(rgba(0,0,0,1)));
}
.textshadow h1 {
	-moz-text-shadow: 3px 3px 3px #fff;
	-webkit-text-shadow: 3px 3px 3px #fff;
	text-shadow: 3px 3px 3px #fff;
}</code></pre>

<p>Firstly, we supersize our heading text. Next, for browsers that support CSS gradients (i.e. WebKit) we apply a masked gradient over the top of our text. Lastly, for modern browsers we add a white text shadow to lift the heading off the page a bit.</p>

<h2>What about browsers that don’t support font-embedding?</h2>

<p>In that case Modernizr adds a .no-fontface class to the page, so we can serve a graphic background instead and hide the text by indenting it off the viewport altogether.</p>

<pre><code>.no-fontface h1 {
	background: url(images/logo.png) no-repeat;
	display: block;
	height: 200px;
	text-indent: -999em;
	overflow: hidden;
	width: 346px;
}</code></pre>

<p>The result is that our heading looks practically identical in IE7-9, Firefox 3-4, Chrome 8-10, Safari 4-5, plus iPhone and Android.</p>

<p>That’s our quick and simple scenario for this simple one-page EEUK signup site. Watch this space for an expanded site with more information on the event, and probably more CSS3 typography fun.</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[EEUK – Calling UK EE Geeks!]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/eeuk_calling_uk_ee_geeks" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.83</id>
		<published>2011-04-15T10:59:16Z</published>
		<updated>2011-04-15T12:06:17Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>DesignKarma is organising the first ever national UK ExpressionEngine gathering, bringing together some of the UK&#8217;s top designers and developers for a one-day event this summer.</p> <p>Having attended similar events in The Netherlands (EECI), DesignKarma thought it would be fun to gather a bunch of ExpressionEngineers to socialise, network and share. The community agreed, and now I wished I&#8217;d kept my mouth shut! Nonetheless, I&#8217;ll be attempting to organise a smaller, much more informal version of EECI sometime this summer. Maybe it will be the start of many such annual meet-ups.</p>

<p>For anyone interested in attending please visit: <a href="http://www.designkarma.co.uk/?URL=http%3A%2F%2Feeuk.org">http://eeuk.org</a> and register. Plus, you can join in the conversation following the hashtag #eeuk11 on Twitter. See you there!</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[DesignKarma Goes Mobile]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/designkarma_goes_mobile" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.82</id>
		<published>2011-03-07T10:59:00Z</published>
		<updated>2011-11-23T09:04:01Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>&#8220;Responsive&#8221; design is one of the hottest topics for 2011, with site owners and web designers focusing more and more on developing better user experience for non-traditional devices like mobiles and tablets. We thought it was high time we got in on the act!</p> <p>The DesignKarma website works fine across all platforms. However, we thought we&#8217;d have a little fun with a &#8220;lite&#8221; version of our site for folks on the move, using their iPhones, Androids or Blackberry&#8217;s. From now on if you access the homepage via your mobile, you&#8217;ll be redirected to our mobile site, which gives you much simpler content and faster performance. It should give users the DesignKarma basics when they&#8217;re away from their PC.</p>

<p>Responsive design and mobile design are still in their infancy, and not without their bugs. But as a web designer, it&#8217;s actually quite fun to put these simple sites and apps together and push the boundaries a little on a new(ish) platform.</p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[Spring Sale at EEvolution]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/spring_sale_at_eevolution" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.81</id>
		<published>2011-03-02T15:27:51Z</published>
		<updated>2011-03-02T15:32:53Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<content type="html"><![CDATA[
			<p>EEvolution&#8212;DesignKarma&#8217;s ExpressionEngine add-on development platform&#8212;is having a spring sale. Prices dropped on all our add-ons, including the handy EE/vBulletin membership bridge &#8220;vBee&#8221;. Head over to <a href="http://www.designkarma.co.uk/?URL=http%3A%2F%2Fwww.eevolution.co.uk">http://www.eevolution.co.uk</a> for a bargain now.</p> ]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[DesignKarma Redesign: Chapter 3]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/designkarma_redesign_chapter_3" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.79</id>
		<published>2011-02-24T11:58:49Z</published>
		<updated>2011-02-24T11:58:50Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>The previous two chapters of this series focused on the spec, design and setup of the new DesignKarma website. In this final chapter we’ll give an overview of how the site was built in <a href="http://expressionengine.com/index.php?affiliate=designkarma">ExpressionEngine</a>&#8212;looking at our variables, snippets and templates.</p> <p>The new site isn’t typical of our <abbr title="ExpressionEngine">EE</abbr> builds because it’s a little more hard-coded than content managed, and a little simpler overall than regular projects. However, it’s a chance to give a glimpse of how we power our sites using EE and invite feedback on how other folks do it!</p>

<h2>Getting started</h2>

<p>EE developers regularly talk about &#8220;chunking up&#8221; their pages into blocks of code. In some cases this may involve building a full static page or pages, before deciding on the best way to chunk certain elements. More often than not though, this chunking process happens fairly quickly in the developers head, before diving straight into markup.</p>

<p>That was certainly the case on a simple site like ours, where it’s obvious from the design which elements should be chunked as reusable code blocks, and which are page-specific. From there it was a case of creating our global variables, snippets and templates in EE and firing up our favourite HTML editor (TextMate).</p>

<h2>Global variables</h2>

<p>EE’s Global Variables are perfect for holding simple data like phone numbers and other information that will be repeated throughout a website. They parse ahead of everything else in EE, so they’re kind of limited&#8212; no EE tags or PHP allowed. They’re not particularly client-friendly either (we prefer <a href="http://loweblog.com/software/low-variables/">Low Variables</a> for that), so we tend not to use them all that much.</p>

<p>We recently took over a website built by another agency and it had about 50 global variables for things like {container_div_start_tag}. Abstracting your code to this degree has some advantages, but it’s way overboard in our opinion, making updates a real headache. We like simple.</p>

<p>There are only four global variables on our site, and I’m not going to spend a great deal of time detailing them because they don’t really do much! Briefly, they are:</p>

<ul><li><code>&#123;doctype&#125;</code> contains our doctype declaration, in case we decide to change it</li><li><code>&#123;address&#125;</code> contains our street address, used in various places on the site</li><li><code>&#123;author&#125;</code> populates our meta author tags</li><li><code>&#123;modernizr&#125;</code> contains a link to the latest <a href="http://www.modernizr.com">Modernizr</a> script</li></ul>

<p><small>Modernizr is a script that helps us take advantage of the latest web technologies used on our new site, whilst accommodating older browsers that haven’t caught up yet.</small></p>

<h3>A note on naming conventions</h3>

<p>On larger sites we like to prefix our global variables with &#8220;gv_&#8221;. We prefix other elements too, like path variables (pv_) and snippets (sn_), so it’s obvious what each element is in our code&#8212; useful not only during development, but also five years down the line when you come back to make changes. The DesignKarma website is pretty simple though, so we didn’t bother prefixing.</p>

<h2>Snippets</h2>

<p>New to EE2, snippets are a great way to reuse blocks of code. Like global variables, you can go a little overboard with these, but when used correctly they&#8217;re an important way of managing your code and improving performance. Unlike global variables, you can include EE tags and PHP to really make snippets super useful.</p>

<p>We have a number of repeated items on the site that we decided to turn into snippets.</p>

<h3><code>&#123;body_conditions&#125;</code></h3>

<p>We’ve been building some sites lately using HTML5 technologies, and we use a home brew of code distilled from Paul Irish’s popular <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>. Part of that codebase includes some HTML conditional comments to write classes on the <code>&lt;body&gt;</code> tag for Internet Explorer, so we can provide some CSS workarounds for common IE rendering issues. It’s a pity we still have to target workarounds for specific browsers in this day and age (I’m looking at you Microsoft), but having all this crap in a snippet means that one day hopefully we can just strip out the comments and go back to a simple <code>&lt;body&gt;</code> tag instantly across the entire site.</p>

<p>Aside from that, the other purpose of this snippet is so we can add a section class to our pages. Here’s how it all works:</p>

<pre><code>&#123;if segment_1 != ""&#125;
	&lt;!--[if lt IE 7 ]&gt; &lt;body class="ie6 &#123;segment_1&#125;"&gt; &lt;![endif]--&gt;
	&lt;!--[if IE 7 ]&gt;    &lt;body class="ie7 &#123;segment_1&#125;"&gt; &lt;![endif]--&gt;
	&lt;!--[if IE 8 ]&gt;    &lt;body class="ie8 &#123;segment_1&#125;"&gt; &lt;![endif]--&gt;
	&lt;!--[if IE 9 ]&gt;    &lt;body class="ie9 &#123;segment_1&#125;"&gt; &lt;![endif]--&gt;
	&lt;!--[if (gt IE 9)|!(IE)]&gt;&lt;!--&gt;&lt;body class="&#123;segment_1&#125;"&gt;&lt;!--&lt;![endif]--&gt;
&#123;if:else&#125;
	&lt;!--[if lt IE 7 ]&gt; &lt;body class="ie6"&gt; &lt;![endif]--&gt;
	&lt;!--[if IE 7 ]&gt;    &lt;body class="ie7"&gt; &lt;![endif]--&gt;
	&lt;!--[if IE 8 ]&gt;    &lt;body class="ie8"&gt; &lt;![endif]--&gt;
	&lt;!--[if IE 9 ]&gt;    &lt;body class="ie9"&gt; &lt;![endif]--&gt;
	&lt;!--[if (gt IE 9)|!(IE)]&gt;&lt;!--&gt;&lt;body&gt;&lt;!--&lt;![endif]--&gt;
&#123;/if&#125;</code></pre>

<p>So what’s going on here? We’ve got a mix of EE and HTML conditions that add classes to our <code>&lt;body&gt;</code> tag. Let’s start with the EE conditions. Firstly, we check to see if segment_1 is available, which means we’re in a section; not the homepage.</p>

<p>designkarma.co.uk/index.php/<strong>here_is_our_section_segment</strong></p>

<p>If we’re in a section (e.g. About) we want to add that segment as a class to our body tag (e.g. body class=”about”) so we can add some section-specific CSS like repositioning the background image. If no segment is available then we’re on the homepage so no need for a section class.</p>

<p>The HTML comments inside our EE tags are borrowed from HTML5 Boilerplate, and add <code>&lt;body&gt;</code> classes for Internet Explorer browsers, so we can target any CSS workarounds.</p>

<h3><code>&#123;footer&#125;</code></h3>

<p>No prizes for guessing what this is. The footer is exactly the same on every page, so it makes an obvious snippet. There’s nothing of great interest in this snippet of mostly static HTML and a few EE tags, so let’s move on.</p>

<h3><code>&#123;masthead&#125;</code></h3>

<p>The masthead snippet includes our main menu. The <code>&#123;segment_1}&#125;</code>conditional comes in handy again, this time to add an “active” class so we can style the currently active menu item.</p>

<pre><code>&lt;header&gt;
	&lt;a href="#msg" class="visuallyhidden"&gt;Skip navigation&lt;/a&gt;
	&lt;nav&gt;
		&lt;ul class="clearfix"&gt;
			&lt;li&gt;&lt;a href="&#123;homepage&#125;" class="ir dk" title="Web Design Manchester"&gt;Web Design Manchester, &#123;site_name&#125;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&#123;path='about'&#125;"&#123;if segment_1=="about"&#125; class="active"&#123;/if&#125;&gt;About&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&#123;path='what'&#125;"&#123;if segment_1=="what"&#125; class="active"&#123;/if&#125;&gt;What We Do&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&#123;path='folio'&#125;"&#123;if segment_1=="folio"&#125; class="active"&#123;/if&#125;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&#123;path='blog'&#125;"&#123;if segment_1=="blog"&#125; class="active"&#123;/if&#125;&gt;Blog&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&#123;path='contact'&#125;"&#123;if segment_1=="contact"&#125; class="active"&#123;/if&#125;&gt;Contact&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/nav&gt;
&lt;/header&gt;</code></pre>

<h3><code>&#123;scripts&#125;</code></h3>

<p>Generally speaking we like to keep all our scripts in one snippet, with conditions to load scripts and call functions depending on page (or <code>&#123;segment&#125;</code>). This snippet is always added before our template’s closing <code>&lt;body&gt;</code> tag, and in this instance includes:</p>

<ul><li>A link to the latest jQuery repository, hosted on Google</li><li>Links to the the various jQuery plugins used on the website (Tooltip, Nivo Slider, and Validate), plus associated functions</li><li>Our Google Analytics</li></ul>

<h3><code>&#123;teasers&#125;</code></h3>

<p>Our final block of reusable code is for the teasers that appear on the Homepage and Portfolio pages. They give short intros to the “About”, “What We Do” and “Blog” sections. Most of this is hard-coded; only the blog entry is dynamic.</p>

<pre><code>&#123;exp:channel:entries 
	cache="yes" 
	channel="blog" 
	disable="categories|member_data|pagination" 
	dynamic="no" 
	limit="1" 
	orderby="date" 
	refresh="30" 
	sort="desc" 
	sticky="yes"
&#125;
&#123;if no_results&#125;&lt;p&gt;Sorry, the blog is currently closed!&lt;/p&gt;&#123;/if&#125;
&lt;h2&gt;&lt;a href="&#123;title_permalink='blog/comments'&#125;" title="Read &ldquo;&#123;title&#125;&rdquo;"&gt;&#123;exp:trunchtml chars="28" exact="yes" inline="&amp;hellip;"&#125;&#123;title&#125;&#123;/exp:trunchtml&#125;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&#123;exp:trunchtml chars="115" exact="no" inline="_[&amp;hellip;]"&#125;&#123;exp:tagstripper:stripAllTags&#125;&#123;summary&#125;&#123;/exp:tagstripper:stripAllTags&#125;&#123;/exp:trunchtml&#125;&lt;/p&gt;
&lt;p&gt;&lt;a href="&#123;title_permalink='blog/comments'&#125;" title="Read &ldquo;&#123;title&#125;&rdquo;"&gt;Continue reading&lt;/a&gt;&lt;/p&gt;
&#123;/exp:channel:entries&#125;</code></pre>

<p>We always like to use the cache/refresh and disable parameters in our channel entries tags to make sure our engine is running as efficiently as possible. You’ll also notice some 3rd-party plugin code (<code>&#123;exp:trunchtml&#125;</code> and <code>&#123;exp:tagstripper&#125;</code>). This is outlined in <a href="/index.php/blog/comments/designkarma_redesign_chapter_3">Chapter 2</a>, but they basically exist to chop any long blog headings or summaries, so our Blog teaser lines up nicely with the other two teasers.</p>

<h2>Bringing it all together with templates</h2>

<p>With our code successfully chunked up into variables and snippets, it was time to start on our template groups and templates.</p><figure><img src="/images/uploads/template_groups.jpg" width="337" height="437" alt="DesignKarma template groups"><figcaption>DesignKarma template groups</figcaption></figure>

<p>There’s no point going into detail on every single template here. Instead, we’ll illustrate how the bulk of our templates work, as well as picking out a couple items of interest.</p>

<h3>Barebones</h3>

<p>Pretty much every template on the site has the same basic outline:</p>

<pre><code>&#123;doctype&#125;
&lt;html lang="en" class="no-js"&gt;
&lt;head&gt;
	&lt;meta charset="&#123;charset&#125;"&gt;
	&lt;title&gt;Web Design Manchester, Web Development, ExpressionEngine | &#123;site_name&#125;&lt;/title&gt;
	&lt;meta name="description" content="DesignKarma designs and develops ExpressionEngine websites, bringing over a decade of experience to your web project"&gt;
	&lt;meta name="author" content="&#123;author&#125;"&gt;
	&lt;link rel="alternate" type="application/atom+xml" href="&#123;path='blog/atom'&#125;"&gt;
	&lt;link rel="alternate" type="application/rss+xml" href="&#123;path='blog/rss'&#125;"&gt;
	&lt;link rel="stylesheet" href="&#123;stylesheet='_css/index'&#125;"&gt;
	&#123;modernizr&#125;
&lt;/head&gt;

&#123;body_conditions&#125;

&lt;div id="container"&gt;

	&#123;masthead&#125;

	&hellip;main content goes here&hellip;

&#123;footer&#125;

&lt;/div&gt;&lt;!--/container--&gt;
	
&#123;scripts&#125;
	
&lt;/body&gt;
&lt;/html&gt;</code></pre>

<p>Our global variable (<code>&#123;doctype&#125;</code>) is first up, with a couple of EE’s standard global variables next (<code>&#123;charset&#125;</code> and <code>&#123;site_name&#125;</code>). The <code>&#123;author&#125;</code> global variable rounds out our metas, before we link to our Atom and RSS feed templates.</p>

<p>To minimise HTTP requests, we like to link to one stylesheet (_css/index) and use media queries in the stylesheet itself for print and (coming soon) smart phone styles.</p>

<p>All that’s left now is to add our <code>&#123;modernizr&#125;</code>, <code>&#123;body_conditions&#125;</code>, <code>&#123;masthead&#125;</code>, <code>&#123;footer&#125;</code> and <code>&#123;scripts&#125;</code>.</p>

<h3>Taking it a step further</h3>

<p>Where our basic outline gets slightly different is on single entry templates&#8212; for example a single project page or blog article. On these templates we want to throw some data into the <code>&lt;title&gt;</code> and <code>&lt;meta&gt;</code> tags, so we need our EE tags at the start.</p>

<pre><code>&#123;exp:channel:entries 
	channel="blog" 
	disable="category_fields|member_data|pagination" 
	dynamic="yes" 
	limit="1" 
	require_entry="yes"
&#125;
&#123;if no_results&#125;&#123;redirect='error'&#125;&#123;/if&#125;
&#123;doctype&#125;
&lt;html lang="en" class="no-js"&gt;
&lt;head&gt;
	&lt;meta charset="&#123;charset&#125;"&gt;
	&lt;title&gt;&#123;if browser_title&#125;&#123;browser_title&#125;&#123;if:else&#125;&#123;title&#125;&#123;/if&#125; | &#123;site_name&#125;&lt;/title&gt;
	&lt;meta name="description" content="&#123;meta_description&#125;"&gt;</code></pre>

<p>The example above shows our “comments” template&#8212;used to display the page you’re looking at right now. As usual we’re optimizing the engine by disabling stuff we don’t need with the <em>disable=</em> parameter. We’re also using the <em>require_entry</em> parameter to improve error handling on mistyped URLs. Without this, someone could type anything in segment_3 and EE would show our latest entry by default. Well, I don’t really want our latest article being linked to or indexed as:</p>

<p>designkarma.co.uk/index.php/blog/comments/<strong>the_most_boring_article_ever</strong></p>

<p>So using the <em>require_entry</em> parameter is a nice save for mistyped (or mischievous) URLs.</p>

<p>Also in the above code, we’re using our custom fields aimed at improving SEO (<code>&#123;browser_title&#125;</code> and <code>&#123;meta_description&#125;</code>). Note, we’re checking to see if our <code>&#123;browser_title&#125;</code> field contains a value or not. If it doesn’t, we fall back to the entry <code>&#123;title&#125;</code>.</p>

<h3>Marking up the blog with HTML5</h3>

<p>Okay we may be going a little off-piste here but I thought it might be interesting to outline how we mark up our blog using HTML5 and EE.</p>

<p>HTML5 is a fairly new technology and there is still some discussion on how best to markup a blog, so we thought we’d chip in. Also, we haven’t seen any examples of HTML5 blog markup with EE tags yet so let’s add that in to the mix while we’re at it.</p>

<pre><code>&#123;exp:channel:entries 
	channel="blog" 
	disable="category_fields|member_data" 
	dynamic="yes" 
	limit="5"
&#125;
&#123;if no_results&#125;&lt;p&gt;Well that's embarrassing! There are currently no blog entries available. Please check back soon.&lt;/p&gt;&#123;/if&#125;
&lt;section&gt;
	&lt;header&gt;
		&lt;hgroup class="clearfix"&gt;
			&lt;h1&gt;&lt;a href="&#123;title_permalink='blog/comments'&#125;" title="Read &ldquo;&#123;title&#125;&rdquo;"&gt;&#123;title&#125;&lt;/a&gt;&lt;/h1&gt;
			&lt;h2&gt;&lt;time pubdate datetime="&#123;gmt_entry_date format='&#123;DATE_W3C&#125;'&#125;"&gt;&#123;gmt_entry_date format="%d %M %y"&#125;&lt;/time&gt;&lt;/h2&gt;
		&lt;/hgroup&gt;
	&lt;/header&gt;
	&lt;div class="details"&gt;
		&lt;p class="author"&gt;Posted by &#123;author&#125;&lt;/p&gt;
		&lt;p&gt;&#123;if allow_comments&#125;&lt;a href="&#123;title_permalink='blog/comments'&#125;" title="Read &ldquo;&#123;title&#125;&rdquo;"&gt;&#123;if comment_total==1&#125;1 comment&#123;if:else&#125;&#123;comment_total&#125; comments&#123;/if&#125;&lt;/a&gt;. &#123;/if&#125;Filed under &#123;categories backspace="2" disable="category_fields" style="linear"&#125;&ldquo;&lt;a href="&#123;path='blog'&#125;" title="View all entries in this category"&gt;&#123;category_name&#125;&lt;/a&gt;&rdquo;, &#123;/categories&#125;&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class="summary"&gt;
		&#123;summary&#125;
	&lt;/div&gt;
&lt;/section&gt;
&#123;paginate&#125;
&#123;if &#123;total_pages&#125; &gt; 1&#125;
&lt;p class="pagination"&gt;
	&#123;if previous_page&#125;&lt;a href="&#123;auto_path&#125;" class="prv"&gt;Previous&lt;/a&gt; / &#123;/if&#125;
	&#123;if next_page&#125;&lt;a href="&#123;auto_path&#125;" class="nxt"&gt;Next&lt;/a&gt;&#123;/if&#125;
&lt;/p&gt;
&#123;/if&#125;
&#123;/paginate&#125;
&#123;/exp:channel:entries&#125;</code></pre>

<p>The code block above outputs our last five blog entries in date order. HTML5 newbies will spot the new <code>&lt;header&gt;</code> and <code>&lt;time&gt;</code> tags right away. Note that we’re using EE’s handy <code>&#123;DATE_W3C&#125;</code> formatting variable to format the entry’s datetime attribute just how the W3C likes it.</p>

<p>One other point of interest is oftentimes we only want to show pagination links when needed rather than by default. To do this (and there are various other ways) we surround our pagination links with the condition:</p>

<pre><code>&#123;if &#123;total_pages&#125; &gt; 1&#125; &hellip;show our pagination links&hellip; &#123;/if&#125;</code></pre>

<p>In other words, if the number of entries exceeds our limit (set as five in this case) and requires another page; show the links.</p>

<h3>A bit of CSS trickery</h3>

<p>One last thing it might be fun to share with you is how we built the three random screens feature on the homepage.</p><figure><img src="/images/uploads/screens.jpg" width="700" height="267" alt="DesignKarma random screens"><figcaption>DesignKarma random screens</figcaption></figure>

<p>Grabbing three random entries from the folio is the easy bit:</p>

<pre><code>&#123;exp:channel:entries 
	channel="folio" 
	disable="categories|member_data|pagination" 
	dynamic="no" 
	limit="3" 
	orderby="random" 
	search:folio_show="=Yes"  
	sticky="yes"
&#125;</code></pre>

<p>Here, we’re being careful to only select entries with the custom field <code>&#123;folio_show&#125;</code> set to “Yes”. We created this field because we want to restrict which projects we display on the homepage.</p>

<p>Next, we need to output screens for the three projects in seperate <code>&lt;div&gt;</code>s with their own ids, so we can position and overlap them with CSS. To further complicate things, we need the first screen to be larger than the other two. So here goes:</p>

<pre><code>&lt;div id="screen_&#123;count&#125;"&gt;
	&lt;a href="&#123;path='folio'&#125;" title="Check out the portfolio"&gt;
		&#123;if count == "1"&#125;
		&#123;exp:ed_imageresizer 
			alt="&#123;title&#125;" 
			debug="yes" 
			forceWidth="yes" 
			image="&#123;folio_img_1&#125;" 
			maxHeight="319" 
			maxWidth="460"
		&#125;
		&#123;if:else&#125;
		&#123;exp:ed_imageresizer 
			alt="&#123;title&#125;" 
			debug="yes" 
			forceWidth="yes" 
			image="&#123;folio_img_1&#125;" 
			maxHeight="229" 
			maxWidth="330"
		&#125;
		&#123;/if&#125;
	&lt;/a&gt;
&lt;/div&gt;</code></pre>

<p>Here, we’re creating three <code>&lt;div&gt;</code>s with their own ids depending on result <code>&#123;count&#125;</code>&#8212; i.e. #screen_1, #screen_2, #screen_3. For the first screen (where <code>&#123;count&#125;</code> is 1) we use the ED Image Resizer plugin to resize and cache the screen image at the larger size of 460 x 319 pixels. Subsequent screens are re-sized and outputted at 330 x 229 pixels. Now we need to positioning and stack these layers with CSS to give us our three dimensions:</p>

<pre><code>#screen_1, #screen_2, #screen_3&#123;
	float: left;
	position:relative;
&#125;
#screen_1&#123;
	margin: -286px 0 0 219px;
	width: 462px;
	z-index: 98;
&#125;
#screen_2&#123;
	margin: -271px 0 0 0;
	width: 332px;
	z-index: 97;
&#125;
#screen_3&#123;
	margin: -271px 0 0 608px;
	width: 332px;
	z-index: 96;
&#125;</code></pre>

<p>On top of the three screens we’re floating the transparent PNG shown below.</p><figure><img src="/images/uploads/cover.jpg" width="700" height="224" alt="Browser chrome outlines used on DesignKarma"><figcaption>Browser chrome outlines used on DesignKarma</figcaption></figure>

<p>This gives our browser chrome outlines and a nice bit of light and shade on top of our screens. We could’ve included the outlines and shading on the actual project screen images, but we preferred to keep these pure in case we wanted to apply a different treatment or decoration at a later date, if that makes sense.</p>

<p>So, before our <code>&lt;div id=”screen_1”&gt;</code> we have an empty <code>&lt;div id=”chrome”&gt;</code>. Not very semantic I’m afraid, but allow us some creative license here. To get this layer to sit on top of everything the CSS goes like this:</p>

<pre><code>#chrome&#123;
	background: transparent url(/images/cover.png) 50% 0 no-repeat;
	float: left;
	height: 301px;
	position:relative;
	width: 940px;
	z-index: 99;
&#125;</code></pre>

<p>To finish off, we added some borders to our screens&#8230;</p>

<pre><code>#screen_1 img, #screen_2 img, #screen_3 img&#123;
	border-bottom: 1px solid #999;
	border-left: 1px solid #999;
	border-right: 1px solid #999;
&#125;</code></pre>

<p>...and we’re done.</p>

<h2>It’s a wrap</h2>

<p>That about does it for this series. Maybe you’ve learnt something, maybe you haven’t. But I always find it fascinating to see how other EE developers work and thought it was about time DesignKarma contributed something. Hopefully we’ll continue to post more EE insight, tips and tricks when we can.</p>

<p><strong>We’d love to hear your feedback on the above, and how you build your EE sites. Why not leave a comment below?</strong></p>]]>
		</content>
	</entry>
	
	<entry>
		<title><![CDATA[DesignKarma Redesign: Chapter 2]]></title>
		<link rel="alternate" type="text/html" href="http://www.designkarma.co.uk/blog/comments/designkarma_redesign_chapter_2" />
		<id>tag:http://www.designkarma.co.uk/,2011:index.php/blog/2.77</id>
		<published>2011-02-16T11:32:07Z</published>
		<updated>2011-02-16T11:53:08Z</updated>
		<author>
			<name>Ian Ebden</name>
			<email>info@designkarma.co.uk</email>
					</author>
		
		<category term="<![CDATA[ExpressionEngine]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/expressionengine"
			label="<![CDATA[ExpressionEngine]]>" />
		
		<category term="<![CDATA[General]]>"
			scheme="http://www.designkarma.co.uk/blog/comments/category/general"
			label="<![CDATA[General]]>" />
		
		<content type="html"><![CDATA[
			<p>Armed with our wire frames and designs from <a href="/index.php/blog/comments/76">chapter 1</a>, the next chapter of this show-and-tell series focuses on installation and setup of our content management system. Here’s where we go to Geek Level One I’m afraid. We’ll be looking specifically at <a href="http://expressionengine.com/index.php?affiliate=designkarma">ExpressionEngine</a> setup and there may be some minor code references. It’s all quite interesting though!</p> <h2>Setting up content management with ExpressionEngine 2</h2>

<p>As part of the redesign, we wanted to move from EE1 to EE2 and take advantage of some of the new performance and code management features. We’ve learnt an enormous amount since we built the old site in EE1 and liked the idea of a fresh installation, rather than an upgrade. The only difficulty with starting from scratch rather than upgrading, was importing the old blog entries, but that’s another story.</p>

<h2>Development environment</h2>

<p>The DesignKarma website is much simpler than our usual EE projects, so I decided to just install locally in MAMP on my MacBook. That also meant I could continue to work on the site when out and about over Christmas and New Year, often without a web connection.</p>

<p>Once completed, I simply exported the database and recreated it on the live server. Then it was a case of deleting the old site and uploading the new one, changing some paths and hey presto! The switch took less than 30 minutes.</p>

<h2>ExpressionEngine installation and preferences</h2>

<p>It depends on the site but generally speaking there are a number of things we do right after every new EE installation. On complex high traffic sites, we like to turn on “Display Output Profiler” and “Display Template Debugging” (Admin > System Administration > Output and Debugging), so we can see how our templates are processing and optimize as much as possible during development.</p>

<p>On most of our sites we also turn off tracking (Admin > Security and Privacy > Tracking Preferences). Tracking is really for creating things like “most viewed entries” lists. Turning it off can greatly improve system speed, especially on higher traffic sites.</p>

<p>Last few quick changes we make concern security. We always enable throttling (Admin > Security and Privacy > Throttling Preferences), which is a great way to handle possible denial of service attacks. Next, we turn our attention to spammers – membership spam to be specific.</p>

<h3>Fighting membership spam</h3>

<p>Membership spam is an increasing problem on the web,and it’s by no means limited to ExpressionEngine. Greg Salt at <a href="http://www.purple-dogfish.co.uk/">Purple Dogfish</a> gave a great talk on spam at last year’s EECI, and he shared a number of ways to combat and defeat it. An obvious one is – if there’s no front-end membership aspect to your website – just disable new member registrations altogether (Members > Preferences). If you <em>are</em> planning on allowing new member registrations then making one simple change can really help: Change your profile trigger word from “member” to, well&#8230; anything. Spam bots know that EE’s default member templates and registration form are at:</p>

<p><strong>yourdomain.com/index.php/member/</strong></p>

<p>So don’t make it easy for them. Change the trigger word to “community” or “fans”, or anything, helping to mask your registration form. For bonus points, why not Disallow your registration URL and/or member pages from search engine indexing altogether via your robots.txt file.</p>

<p>There are also some pretty good EE add-ons for combatting membership and comment spam, which I encourage you to track down on <a href="http://devot-ee.com/">Devot-ee</a>, but we’re getting a little off-topic now.</p>

<h3>Save yourself the trouble</h3>

<p>In reality we don’t always do fresh installations every time. Instead, we like to just deploy a “ready-rolled” empty installation we made earlier, with all our configs and preferences. It saves time and nobody likes repeating themselves.</p>

<p>One last thing: To keep our EE installations super-secure, we always like to install above the public webroot. That way, all our system folders are protected from HTTP attack. There are some <a href="http://expressionengine.com/user_guide/general/system_above_webroot.html">instructions</a> on how to do this for “Advanced Users”, but it’s actually pretty straightforward. Definitely worth thinking about if you’re an EE newbie.</p>

<h2>Categories, custom fields and channels</h2>

<p>Before we can start publishing in EE, we need to create our categories, fields and channels. At launch, the new DesignKarma site has just 2 channels, 3 categories and 19 custom fields – told you it was a simple site!</p>

<p>Now, ask 10 different EE developers and they’ll give you 10 different ways of building the same site. There is no right or wrong way. Actually, there are a few wrong ways, but my point is that there are many different ways to go about the same thing, and this is just <em>my way</em> on <em>this website</em>.</p>

<h3>Creating our custom fields</h3>

<p>We often like to create a “Default” custom field group, which can be used for a variety of instances (or channels). We’re using this group for the <a href="http://www.designkarma.co.uk/blog">blog</a>, and it consists of:</p>

<ul><li>Browser Title (Text Input)</li><li>Meta Description (Text Input)</li><li>Image (File)</li><li>Summary (Textarea)</li><li>Extended (Textarea)</li></ul>

<p>The “Browser Title” field is used for the text that appears in the very top of the browser (inside our &lt;title&gt; tags) as well as in a search engine listing. It’s an <acronym title="Search Engine Optimization">SEO</acronym> feature we like to build into our sites; and in our comments template (i.e. the one you’re looking at now) we’ve included a condition to fallback to the entry Title if our Browser Title field is left blank, like so:</p>

<pre><code>&lt;title&gt;&#123;if browser_title&#125;&#123;browser_title&#125;&#123;if:else&#125;&#123;title&#125;&#123;/if&#125; | &#123;site_name&#125;&lt;/title&gt;</code></pre>

<p>Again, for SEO we’ve got a Meta Description field. No Meta <em>Keywords</em>? Well they tend not to be used much nowadays by search engines so we don’t really use them anymore in our sites. The remaining fields are self-explanatory.</p>

<p>We also have a “Folio” custom field group for publishing folio entries, which consists of similar fields plus a few more:</p>

<ul><li>Image 1-5 (all File fields)</li><li>Tasks (Checkboxes)</li><li>Description (Textarea)</li><li>Web Address (Text Input)</li><li>Testimonial (Textarea)</li><li>Testimonial Source (Text Input)</li><li>Show on homepage? (Select Dropdown)</li></ul>

<p>The five “Image” fields make up the slideshows on our project template. The “Tasks” checkboxes allow us to check/uncheck the various project’s tasks (Branding, CMS&#8230;). This outputs on the folio and project website pages.</p>

<p>A quick note about our field naming convention. We like to prefix our field names with the field group name. So for example, the Folio field group has fields named:</p>

<ul><li>{folio_img_1}</li><li>{folio_tasks}</li></ul>

<p>And so on&#8230; This makes it much easier to identify your channel’s fields in your template code and avoid any conflicts with similar fields in other groups. For the Default group, our fields have no prefix (e.g. {meta_description}).</p>

<p>Back to our Folio group then. The “Show on homepage?” dropdown let’s us choose whether or not to include the project in the 3 random screens displayed on the homepage. We want to limit the <a href="http://www.designkarma.co.uk/folio">folio page</a> to only display our most recent projects. However, we might still want to display some of our older projects on the homepage, so that’s where this field comes in. Ideally, we would like to have used a checkbox instead of a dropdown, but EE’s search= parameter only works with text input, textarea and dropdown list custom fields, so ‘dropdown’ it is. Here’s our “Show on homepage?” (or {folio_show}) field in action on the homepage template:</p>

<pre><code>&#123;exp:channel:entries 
	channel="folio" 
	disable="categories|member_data|pagination" 
	dynamic="no" 
	limit="3" 
	orderby="random" 
	search:folio_show="=Yes"
&#125;</code></pre>

<p><small>Note&#8212; We like to order our parameters alphabetically. We’re fussy like that!</small></p>

<p>Here we’re grabbing three random entries from the folio channel where “Show on homepage?” (or {folio_show}) is set to “Yes”. By the way, there’s some tricky EE/HTML/CSS involved in those 3 screens that we may touch on later.</p>

<p>The only Categories we have are for the blog, and they are “ExpressionEngine”, “Site Launches” and “General”. Hmm&#8230; not much more I can add to that really.</p>

<p>We tie it all together with our 2 Channels, “Blog” and “Folio”. We could’ve created channels for things like the <a href="http://www.designkarma.co.uk/about">About</a> and <a href="http://www.designkarma.co.uk/what">What We Do</a> pages, but since we’re web developers we may as well just hard-code those pages.</p>

<h2>Tidying the publish page</h2>

<p>The last thing we do as far as setting up the publishing process, is tidy up the publish page. This is a nice feature of EE2 and allows us to order our fields in a way that makes sense for clients, and hide any fields or features that the client doesn’t need. The result is a super-simple, efficient publish page.</p>

<p>If it’s good enough for our clients it’s good enough for us too, so we went ahead and quickly tidied the publish page for Blog and Folio&#8212;see example below. Notice we’ve popped our “Browser Title” and “Meta Description” fields into a custom “SEO” tab.</p><figure><img src="/images/uploads/DK_Publish_Folio.png" width="700" height="866" alt="DesignKarma ExpressionEngine Publish Page screenshot"><figcaption>DesignKarma ExpressionEngine Publish Page screenshot</figcaption></figure>

<h2>Add-ons</h2>

<p>There’s an impressive number of 3rd-party add-ons for ExpressionEngine that bring extra features and functionality (we’ve even <a href="http://www.eevolution.co.uk" title="Custom ExpressionEngine Add-ons from EEvolution">created our own</a>). We like to keep things light and tight however, only using an add-on if there’s very good reason. With a simple site like ours there aren’t many good reasons. Even so, we have a few old favourites on board DesignKarma.</p>

<p>We regularly use <a href="http://www.solspace.com/docs/detail/freeform_form/">Freeform</a> from Solspace. EE’s native Email module is kind of limited, and we like the ability to capture and store our Contact form submissions. Bad things can sometimes happen with simple form-to-email and we don’t want to miss out on that next big lead.</p>

<p><a href="http://devot-ee.com/add-ons/cp-analytics/">CP Analytics</a> is another staple of our EE sites, providing a graphical overview of your Google Analytics.</p>

<p>We have three additional plugins installed on DesignKarma:</p>

<ul><li><a href="http://devot-ee.com/add-ons/ed-imageresizer/">ED Image Resizer</a></li><li><a href="http://devot-ee.com/add-ons/supergeekery-tag-stripper/">SuperGeekery Tag Stripper</a></li><li><a href="http://devot-ee.com/add-ons/trunchtml/">TruncHTML</a></li></ul>

<p>ED Image Resizer is used to resize and cache our published images (homepage, folio, blog). We use different EE image sizing plugins on different sites, for different reasons. ED Image Resizer is great for simple proportional resizing and cacheing on the fly, but we like other plugins for things like cropping or watermarking on other sites.</p>

<p>We use a combination of SuperGeekery Tag Stripper and TruncHTML to grab extracts for things like our blog teaser on the homepage.</p><figure><img src="/images/uploads/blog_teaser.png" width="368" height="208" alt="Example blog teaser on DesignKarma"><figcaption>Example of the blog &#8220;teaser&#8221; on DesignKarma</figcaption></figure>

<p>For our three columns we want to maintain a nice layout of single heading and three line teaser, so we need to truncate longer headings and/or summaries. Since our blog Title has no formatting, we just use TruncHTML:</p>

<pre><code>&lt;h2&gt;&lt;a href="&#123;title_permalink='blog/comments'&#125;" title="Read &ldquo;&#123;title&#125;&rdquo;"&gt;&#123;exp:trunchtml chars="28" exact="yes" inline="&amp;hellip;"&#125;&#123;title&#125;&#123;/exp:trunchtml&#125;&lt;/a&gt;&lt;/h2&gt;</code></pre>

<p>If our heading is longer than 28 characters and gets truncated, we add a horizontal ellipsis (...) on the end.</p>

<p>Our blog summary comes from a Textarea field and may contain some formatting (like hyperlinks) that mangles the page if the HTML tags are truncated. That’s where SuperGeekery Tag Stripper comes to the rescue. Our data is first passed through the tag stripper so only text is returned, and we can then safely truncate.</p>

<pre><code>&lt;p&gt;&#123;exp:trunchtml chars="115" exact="no" inline="_[&amp;hellip;]"&#125;&#123;exp:tagstripper:stripAllTags&#125;&#123;summary&#125;&#123;/exp:tagstripper:stripAllTags&#125;&#123;/exp:trunchtml&#125;&lt;/p&gt;</code></pre>

<p>We add our ellipsis at the end again, but this time with a space (indicated with an underscore) and brackets.</p>

<p>I recently came across a new add-on that might do the job of both TruncHTML and the Tag Stripper, but I’ve yet to try it out. I’m sure there are many other ways of doing this too. Why not leave your comment below?</p>

<p>That’s it as far as installation and setup!</p>

<h2>Next up: Variables, Snippets, Templates&#8230; Now we’re cooking!</h2>

<p>Okay, no more sissy stuff! In the next chapter we’ll dig deep into the variables, snippets, and templates powering the new website.</p>

<p><strong>Don’t miss the next article: <a href="http://twitter.com/designkarma">Follow us on Twitter</a> or <a href="http://www.designkarma.co.uk/blog/rss">Subscribe to our RSS feed</a>.</strong></p>]]>
		</content>
	</entry>
	
</feed>
