<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>matty.co.za &#187; Magento Themes</title>
	<atom:link href="http://matty.co.za/tag/magento-themes/feed/" rel="self" type="application/rss+xml" />
	<link>http://matty.co.za</link>
	<description>Web developer, WordPress enthusiast, avid musician, music lover and blogger</description>
	<lastBuildDate>Thu, 26 Jan 2012 18:06:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Theming for Magento — Part 04 &#8211; How it all works</title>
		<link>http://matty.co.za/2010/04/magento-themes-part-04/</link>
		<comments>http://matty.co.za/2010/04/magento-themes-part-04/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 08:42:15 +0000</pubDate>
		<dc:creator>Matty</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Magento Themes]]></category>
		<category><![CDATA[Theming]]></category>

		<guid isPermaLink="false">http://matty.co.za/?p=917</guid>
		<description><![CDATA[Wow, part 4 already? This is where the real fun comes in, folks. Today we&#8217;ll be opening up some *.phtml and *.xml files, looking at what&#8217;s going on under the hood and finding out how the theme files all tie together. Lets get started, shall we? Before we get to those files&#8230; Folks, before we [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, part 4 already? This is where the real fun comes in, folks. Today we&#8217;ll be opening up some *.phtml and *.xml files, looking at what&#8217;s going on under the hood and finding out how the theme files all tie together. Lets get started, shall we?</p>
<h3>Before we get to those files&#8230;</h3>
<p>Folks, before we dive into the files, lets get some concepts down that are crucial to understanding how the Magento theme files play together.</p>
<p>Magento themes consist of, aside from styling assets (CSS, images, Javascript, etc) a collection of *.phtml (essentially, XHTML files that can execute PHP) and *.xml (Extensible Markup Language) files that make the theme work.</p>
<p>The *.xml files define blocks and regions, which template files get used for which blocks &amp; regions as well as various attributes and parameters for each if these definitions, where applicable.</p>
<p>While the *.xml files tell everything where to be and what to look like, the *.phtml files contain the actual XHTML code required for each block and region.</p>
<ul class="messages">
<li>
<div class="notify-msg">At the time of writing this tutorial, I have upgraded my Magento installation to Community Edition 1.4. All further tutorials, as well as this one, will be  referencing Magento Community Edition 1.4 unless otherwise stated. Please be sure you have the latest version.</div>
</li>
</ul>
<p><span id="more-917"></span></p>
<h4>Blocks and regions? Huh?</h4>
<p>Yes, blocks and regions.</p>
<p>Magento has a system called &#8220;Static Blocks&#8221;, which allows theme authors to define areas which are updatable via the administration console using a simple textarea. This is used, by default, in the footer as well as for one or two other areas, and can be very  useful for allowing the theme users to update small chunks of content on their store. These are referred to in this tutorial as &#8220;blocks&#8221;.</p>
<p>Regions. This is where we need to get conceptual.</p>
<p>The easiest way I&#8217;ve found to explain this concept is by comparing regions to widgetised areas in WordPress. When users create widgetised areas in WordPress, they are creating areas that are open for the user to insert blocks of content (widgets) that will take on appropriate styling. The region concept is similar.</p>
<p>In Magento, by default, certain blocks are placed in certain regions (for example, Layered Navigation in the left column). This is the reason why it is so important to make use of all possible template types when theming for Magento (3 columns, 2 columns, 1 column, etc), as there is a tried and tested reason why each block is placed in a particular region. This can, however, be modified via the *.xml file (which does all the &#8220;do this, do that&#8221;, remember?), so its not a major worry if you need to move a block.</p>
<h3>So, what&#8217;s a *.phtml file anyway?</h3>
<p>A *.phtml file is a template file. It can either define a page template to be used when displaying a particular type of page (product page, category page, CMS page, etc) or a template to be used in a particular area, for example, the way each single product is displayed when a category is in list mode or grid mode, or the way your footer links static block (activated by default when Magento is installed) is displayed within your theme.</p>
<p>Lets take a look at a fairly standard *.phtml file, 2columns-right.phtml, found in your theme&#8217;s directory within the &#8220;app &gt; design&#8221; folder.</p>
<pre name="code" class="php">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="&lt;?php echo $this-&gt;getLang() ?&gt;" lang="&lt;?php echo $this-&gt;getLang() ?&gt;"&gt;
&lt;head&gt;
&lt;?php echo $this-&gt;getChildHtml('head') ?&gt;
&lt;/head&gt;
&lt;body&lt;?php echo $this-&gt;getBodyClass()?' class="'.$this-&gt;getBodyClass().'"':'' ?&gt;&gt;
&lt;?php echo $this-&gt;getChildHtml('after_body_start') ?&gt;
&lt;div class="wrapper"&gt;
    &lt;?php echo $this-&gt;getChildHtml('global_notices') ?&gt;
    &lt;div class="page"&gt;
        &lt;?php echo $this-&gt;getChildHtml('header') ?&gt;
        &lt;div class="main-container col2-right-layout"&gt;
            &lt;div class="main"&gt;
                &lt;?php echo $this-&gt;getChildHtml('breadcrumbs') ?&gt;
                &lt;div class="col-main"&gt;
                    &lt;?php echo $this-&gt;getChildHtml('global_messages') ?&gt;
                    &lt;?php echo $this-&gt;getChildHtml('content') ?&gt;
                &lt;/div&gt;
                &lt;div class="col-right sidebar"&gt;&lt;?php echo $this-&gt;getChildHtml('right') ?&gt;&lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;?php echo $this-&gt;getChildHtml('footer') ?&gt;
        &lt;?php echo $this-&gt;getChildHtml('before_body_end') ?&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;?php echo $this-&gt;getAbsoluteFooter() ?&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The above code is a direct copy/paste of the 2columns-right.phtml file, packaged with the base &gt; default theme in Magento 1.4. The use of $this-&gt;getChildHtml() is directed at retrieving specific template files, declared within the page.xml file. The other functions, getAbsoluteFooter() and getBodyClass() are, for the scope of this tutorial, not relevant.</p>
<h3>&#8230; and the XML?</h3>
<p>This file defines our regions, sets up blocks within those regions and tells each region which template to use. It is also used for loading theme-specific CSS and JavaScript, as well as activating and deactivating blocks within specific regions in particular sections of your Magento theme. Essentially, the XML file controls everything related to the module in question.</p>
<p>In most cases, the majority of your time when theming will be spent within page.xml. As this file is well and truly gigantic for pasting into a blog post (approximately 182 lines), I&#8217;ll paste just the relevant snippets for getting the aim of this tutorial across.</p>
<pre>&lt;block type="core/text_list" name="left" as="left" translate="label"&gt;
&lt;label&gt;Left Column&lt;/label&gt;
&lt;/block&gt;</pre>
<div>What you see above is the creation of the region called &#8220;left&#8221;. This is telling Magento that we have a region called &#8220;left&#8221;, to which blocks in a multitude of modules can be assigned. This is a blank area of the theme, to which content, in the form of blocks, is pointed (emphasising the point, there).</div>
<pre name="code" class="php">
<div id="_mcePaste">&lt;reference name="left"&gt;</div>
<div id="_mcePaste">&lt;block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml"&gt;</div>
<div id="_mcePaste">&lt;action method="setImgSrc"&gt;&lt;src&gt;images/media/col_left_callout.jpg&lt;/src&gt;&lt;/action&gt;</div>
<div id="_mcePaste">&lt;action method="setImgAlt" translate="alt" module="catalog"&gt;&lt;alt&gt;Our customer service is available 24/7. Call us at (555) 555-0123.&lt;/alt&gt;&lt;/action&gt;</div>
<div id="_mcePaste">&lt;action method="setLinkUrl"&gt;&lt;url&gt;checkout/cart&lt;/url&gt;&lt;/action&gt;</div>
<div id="_mcePaste">&lt;/block&gt;</div>
<div id="_mcePaste">&lt;/reference&gt;</div>
</pre>
<p>The block of code above is from catalog.xml, the controller XML file for all things related to the Magento catalog. The above block of code creates one of the default callout blocks (a block with an image and a URL) that is bundled with the default Magento theme. Lets spend some time on this block of code.</p>
<h3>So&#8230; how do I use these files?</h3>
<p>The first and last lines, in this case, are the most important. They tell Magento that anything within them (ie: the block inside the &lt;reference&gt; tags) will be assigned to the &#8220;left&#8221; region. Inside that, the &lt;block&gt; tags setup the callout block with it&#8217;s various attributes. As the &lt;action&gt; tags are rather specific to this callout (they use specific image-related methods to setup the source of the image, it&#8217;s alternate text and the URL to which it points), lets focus on the opening &lt;block&gt; tag.</p>
<p>The opening &lt;block&gt; tag has the following attributes: type, name and template. These do exactly what they say on the tin.</p>
<p>type- Tells Magento what type of block this is (it could be a product list, catalog, a display of only new products, etc). This is dependent on the type of content within the block. In this case, it&#8217;s a raw image using a specific template, so it&#8217;s a core/template.</p>
<p>name- What this block is referred to as within the XML files.</p>
<p>template- What template file is used to render this block within the theme. In this case, it&#8217;s a template called left_col.phtml within the &#8220;callouts&#8221; folder. This file looks like this:</p>
<pre name="code" class="php">
<div class="block block-banner">
<div class="block-content">
   &lt;div class="block block-banner"&gt;</div>

&lt;div class="block-content"&gt;
        &lt;?php if(strtolower(substr($this-&gt;getLinkUrl(),0,4))==='http'): ?&gt;
            &lt;a href="&lt;?php echo $this-&gt;getLinkUrl() ?&gt;" title="&lt;?php echo $this-&gt;__($this-&gt;getImgAlt()) ?&gt;"&gt;
        &lt;?php elseif($this-&gt;getLinkUrl()): ?&gt;
            &lt;a href="&lt;?php echo $this-&gt;getUrl($this-&gt;getLinkUrl()) ?&gt;" title="&lt;?php echo $this-&gt;__($this-&gt;getImgAlt()) ?&gt;"&gt;
        &lt;?php endif; ?&gt;
            &lt;img src="&lt;?php echo $this-&gt;getSkinUrl($this-&gt;getImgSrc()) ?&gt;"&lt;?php if(!$this-&gt;getLinkUrl()): ?&gt; title="&lt;?php echo $this-&gt;__($this-&gt;getImgAlt()) ?&gt;"&lt;?php endif; ?&gt; alt="&lt;?php echo $this-&gt;__($this-&gt;getImgAlt()) ?&gt;" /&gt;
        &lt;?php if($this-&gt;getLinkUrl()): ?&gt;
        &lt;/a&gt;
        &lt;?php endif ?&gt;
    &lt;/div&gt;
&lt;/div&gt;</div>
</pre>
<p>Above you can see some familiar functions such as getImgSrc() (related to setImgSrc() within the XML file). These functions retrieve the data that is set within the &lt;reference&gt; tags in the XML file.</p>
<h3>&#8230; and to sum it all up &#8230;</h3>
<p>Okay. Lets sum this up in a single paragraph.</p>
<p>Wherever dynamic content is set within your theme, it is more often than not done using a region. These regions are usually set within the page.xml file, as the &#8220;page&#8221; module defines the main skeleton of the Magento theme. Blocks specific to the module they work with are set in that modules XML file, with a &lt;reference&gt; to the region in which they are displayed. A template file, usually stored within the module in question, is used to render the content that is retrieved by the block it is used on.</p>
<p>Wow, this was a busy tutorial. There&#8217;s a lot to take in above, folks. If any of it seems unclear, please leave a comment and I&#8217;ll do my best to help clarify things.</p>
]]></content:encoded>
			<wfw:commentRss>http://matty.co.za/2010/04/magento-themes-part-04/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Theming for Magento — Part 03 &#8211; Theming Basics</title>
		<link>http://matty.co.za/2009/10/magento-themes-part-03/</link>
		<comments>http://matty.co.za/2009/10/magento-themes-part-03/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 16:54:00 +0000</pubDate>
		<dc:creator>Matty</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Themes]]></category>
		<category><![CDATA[Theming]]></category>

		<guid isPermaLink="false">http://matty.co.za/?p=711</guid>
		<description><![CDATA[Right. We&#8217;re in part 03 of our &#8220;Theming for Magento&#8221; tutorial collection. Time to get down to some theming. A quick word on conventions Magento, like many other content management systems, likes to follow conventions. Adopting these conventions when designing your theme, as well as during the theming process, can greatly minimize the amount of [...]]]></description>
			<content:encoded><![CDATA[<p>Right. We&#8217;re in part 03 of our &#8220;Theming for Magento&#8221; tutorial collection. Time to get down to some theming.</p>
<h3>A quick word on conventions</h3>
<p>Magento, like many other content management systems, likes to follow conventions. Adopting these conventions when designing your theme, as well as during the theming process, can greatly minimize the amount of code required by your theme. As mentioned on Part 02, Magento has a &#8220;fall back&#8221; feature where it looks for required files, when not in your theme, within all other themes in the current interface until it finds the file it requires. This essentially allows users to keep a copy of the default theme in the interface in which they are coding their theme (either the &#8220;default&#8221; or a custom interface) and to only modify the files that require customisation.<span id="more-711"></span></p>
<p>An example of the above-mentioned conventions can be seen in the way that boxes are styled within Magento. Boxes are not unlike &#8220;widgets&#8221; in WordPress. Each box is assigned a unique class for specific styling to that box, as well as a generic class for global styling.</p>
<p>A CSS block for global Magento box styling looks like this (no attributes currently set for each class):</p>
<p><code>.box {}<br />
.box .head {}<br />
.box .head h4 {}<br />
.box .content {}</code></p>
<p>By styling the above tags in a CSS file within your theme, you should be able to style the majority of sidebar blocks within your Magento theme.</p>
<h3>Setting up your theme&#8217;s stylesheets</h3>
<p>As mentioned in Part 02, Magento themes are made up of templates and XML files, as well as a folder to hold all images, CSS files and other assets. For starters, I&#8217;d recommend making copies of all CSS files within the default theme and placing them in the same relative location within your custom theme (most likely the &#8220;CSS&#8221; folder within your theme&#8217;s &#8220;skin&#8221; folder). Once you&#8217;ve got the hang of working with these CSS files, or to add your own so your own CSS file conventions can be used, the calls to the CSS files are located in page.xml near the top of the file. Once you get the hang of the conventions used within Magento, adjusting the theme&#8217;s CSS becomes a lot easier.</p>
<h3>Great, so what other conventions are there?</h3>
<p>If you&#8217;re working in Firefox, I&#8217;d recommend installing the Firebug extension, or something similar. In Safari, use the &#8220;inspect Element&#8221; command. This will allow you to inspect the code of your Magento installation and to identify conventions within the code. As there are an almost endless amount of template files, when styling your theme I find it best to keep a copy of the default theme within the interface in which I&#8217;m coding and to make as many changes as possible via the CSS and images without modifying the template *.phtml files or *.xml files. This way, when your theme is done, you may end up with only several modified *.phtml and *.xml files. Also, if you want to then package your theme as a standalone theme (ie: without requiring the need of the default theme), you can simply copy the unmodified files from the default theme over to yours and voila!</p>
<h3>A Very Important Final Note</h3>
<p>Well, folks, that&#8217;s it for this round of the &#8220;Theming For Magento&#8221; tutorial collection. In Part 04, we&#8217;ll be opening up one or two *.xml and *.phtml files, checking out how they work and looking into ways to create smaller code snippets where possible.</p>
<p>A very important last note: when creating your Magento theme, make a note of all the files you&#8217;ve modified along the way. For example, if you only modify the CSS files, make a note of that. It will help greatly later in when identifying unmodified files for copying over from the default theme and can, in general, be a real time-saver.</p>
]]></content:encoded>
			<wfw:commentRss>http://matty.co.za/2009/10/magento-themes-part-03/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Theming for Magento &#8211; Part 02 &#8211; Theme Architecture</title>
		<link>http://matty.co.za/2009/08/magento-themes-part-02/</link>
		<comments>http://matty.co.za/2009/08/magento-themes-part-02/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 08:25:30 +0000</pubDate>
		<dc:creator>Matty</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Themes]]></category>
		<category><![CDATA[Theming]]></category>

		<guid isPermaLink="false">http://matty.co.za/?p=565</guid>
		<description><![CDATA[OK folks, we&#8217;re not going to rush things. Lets take this theming for Magento one step at a time. In today&#8217;s tutorial, I&#8217;ll be discussing the architecture of Magento themes, the reason for this architecture and a brief introduction into a general idea of what goes where and why. The installation&#8230; lets get it out [...]]]></description>
			<content:encoded><![CDATA[<p>OK folks, we&#8217;re not going to rush things. Lets take this theming for Magento one step at a time. <img src='http://matty.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In today&#8217;s tutorial, I&#8217;ll be discussing the architecture of Magento themes, the reason for this architecture and a brief introduction into a general idea of what goes where and why.</p>
<h3>The installation&#8230; lets get it out of the way</h3>
<p>The Magento installation is, essentially, a click-through process. You need to have a MySQL database created on a server, as well as the login details for this database. Other than that, the various options are fairly clear and straight forward.</p>
<p>For further information on installing Magento, visit the <a href="http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide">Magento Installation Guide</a> and <a href="http://www.magentocommerce.com/knowledge-base">Knowledge Base</a>.<span id="more-565"></span></p>
<h3>Right, it&#8217;s installed. So&#8230; where do I start then?</h3>
<p>The core idea, I believe, within the Magento theme architecture, is the complete separation of form and function (ie: design and functional code). For this reason, each theme is, first and foremost, stored in two folders- <code>app</code> and <code>skin</code>. The <code>app</code> folder holds all templates (consisting of *.phtml and *.xml files&#8230; I&#8217;ll explain in a bit) while the <code>skin</code> folder holds all images, CSS stylesheets, Javascript files, etc.</p>
<h3>Cool. But how do I structure my theme?</h3>
<p>First things first. It is very important that your basic folder structure is exactly the same in both the <code>app</code> and <code>skin</code> folders. The structure is divided into two levels- the &#8220;interface&#8221; and the &#8220;theme&#8221;. An interface is, essentially, a group of themes or can be seen as a folder in which your theme resides. In your interface, it is always good to make sure that at least one theme within the interface contains all necessary template files (the same applies to the skin folder interface). If you&#8217;re creating one theme for a single store, it may make sense to create your theme within the default interface (the &#8220;default&#8221; theme within this interface contains all necessary files for theming). Alternatively, simply creating a copy of the &#8220;default&#8221; theme within your custom interface would do the same thing.</p>
<p>To visually illustrate the concept of interfaces and themes, the folders will look something like this:</p>
<p><code><br />
root_directory<br />
|_app<br />
|__default<br />
|___default<br />
|__your_new_interface<br />
|___default<br />
|___your_new_theme<br />
|____all template files within your theme<br />
</code></p>
<p><code><br />
root_directory<br />
|_skin<br />
|__default<br />
|___default<br />
|__your_new_interface<br />
|___default<br />
|___your_new_theme<br />
|____all asset files within your theme<br />
</code></p>
<h3>OK. My structure is set. What about those template files you mentioned earlier?</h3>
<p>Templates are, essentially, the various areas of your Magento store. They use a combination of *.phtml files (HTML files that can execute PHP commands) and *.xml files (determine layout, declare sidebar block calls, etc) to structure and set out the content for the various sections of your Magento store.</p>
<p>Working with these templates is another tutorial, for now I&#8217;d like to mention one thought that helped me a lot when theming for Magento. The system is built in a completely logical manner. For example, if you wish to customise a newsletter signup block for a particular template (theoretical example) you will look in the newsletter.xml file, and not in the template file you&#8217;re wanting to customise. That&#8217;s just a mindset thing that you may have to get your head around before theming for Magento.</p>
<h3>A quick word on falling back</h3>
<p>Before I wrap things up, I&#8217;d like to comment on the way Magento themes fall back. By &#8220;fall back&#8221;, I&#8217;m referring to the concept of &#8220;looking&#8221; for a particular file in the current theme and, if the file doesn&#8217;t exist, falling back on a fail safe copy of the file. This is the purpose of making sure we always have a fully featured theme within our desired interface. If, for example, your theme template files require button.jpg and your existing theme doesn&#8217;t have the file, Magento will look at all other themes in your interface until it finds the file. There is a much more complex explanation for this in a slideshow presentation I read through a few months ago. The presentation is by <a href="http://www.slideshare.net/zuno/intro-to-magento-cmxexpo-09">Jonathan Lackey</a> and <a href="http://www.slideshare.net/zuno/intro-to-magento-cmxexpo-09">can be found here</a>. Essentially, this also means that, if we so with, we&#8217;re able to make our theme smaller and rely on existing templates from our &#8220;fully featured&#8221; theme (for example, simply modifying CSS and selected XML files instead of the entire theme).</p>
<h3>Until next time&#8230;</h3>
<p>I think this is where I&#8217;ll leave it this time &#8217;round, folks. In the next tutorial, I&#8217;d like to get into a bit of actual theming (now that our architecture is in place) and touch on a few conventions that could greatly speed up the theming process, as well as a few concepts that can become quite important when theming regularly.</p>
]]></content:encoded>
			<wfw:commentRss>http://matty.co.za/2009/08/magento-themes-part-02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theming for Magento &#8211; Part 01</title>
		<link>http://matty.co.za/2009/08/magento-themes-part-01/</link>
		<comments>http://matty.co.za/2009/08/magento-themes-part-01/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 18:27:58 +0000</pubDate>
		<dc:creator>Matty</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento Themes]]></category>
		<category><![CDATA[Theming]]></category>

		<guid isPermaLink="false">http://matty.co.za/?p=561</guid>
		<description><![CDATA[Magento, the popular e-commerce website platform, has, over the past few years, become a prominant player in the content management market. Utilising its robust array of features as well as its stock and sales management fascilities, Magento is a great choice for a system to manage your online store. When setting up your Magento store, [...]]]></description>
			<content:encoded><![CDATA[<p>Magento, the popular e-commerce website platform, has, over the past few years, become a prominant player in the content management market. Utilising its robust array of features as well as its stock and sales management fascilities, Magento is a great choice for a system to manage your online store.</p>
<p>When setting up your Magento store, the system comes packaged with a default theme. In the majority of situations, this is not ideal. Enter theming&#8230; the process of designing and building a custom theme for your Magento store. This post is an introduction to a collection of blog posts discussing theming for Magento, general concepts and a few tips and tricks. These posts are intended as guidelines to theming and not as a verbatim point-for-point on how to create Magento themes. <img src='http://matty.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Before we start, there are a few things you&#8217;ll need:<br />
<span id="more-561"></span></p>
<h3>The latest version of Magento.</h3>
<p>Self-explanatory. Found at <a title="Magento" href="http://magentocommerce.com" target="_blank">http://magentocommerce.com</a></p>
<h3>A web browser with a debug fascility.</h3>
<p>Magento sets up various CSS styles and elements which are applied throughout the store. You&#8217;ll be best off identifying the conventions used and styling those, instead of re-creating each section.</p>
<p>A debug fascility could be either Firefox&#8217;s Firebug addon, Safari&#8217;s built-in debug console or Google Chrome&#8217;s built in debug console.</p>
<h3>A design for your store.</h3>
<p>This is where things may start getting tricky. Its generally best to stay within the guidelines in terms of the elements on the screen for each page of the store. That being said, one doesn&#8217;t want to limit the design. Therefore, a solution I found is to think in terms of a &#8220;header &#8211; footer&#8221; concept&#8230; ie, think in terms of designing &#8220;around&#8221; the content area. You&#8217;ve got a header and footer area that stay the same on all pages, while the content area changes (this includes the sidebars).</p>
<h3>The XHTML/CSS for your store.</h3>
<p>For the scope of these blog posts, I&#8217;d recommend having your store already built in XHTML. Just the header and footer will be enough for now. We&#8217;ll get to the content area once we&#8217;re in Magento.</p>
<h3>A basic understanding of Magento&#8217;s architecture.</h3>
<p>For a basic Magento theme, there isn&#8217;t much need to understand the underlying workings of the system. Essentially, just the templating architecture will suffice. This will be explained in the next blog post.</p>
<h3>A local server installation.</h3>
<p>This could be <a title="WampServer" href="http://www.wampserver.com/" target="_blank">WampServer</a> (Windows), <a title="MAMP" href="http://www.mamp.info/en/index.html" target="_blank">MAMP</a> (Mac) or any other local server installation. Either way, developing your theme on a local server is recommended.</p>
<p>And yeah, that should be all you&#8217;ll need for now. In the next post, I&#8217;ll briefly discuss installing Magento and explain the theme architecture and how to go about starting your theme off. <img src='http://matty.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://matty.co.za/2009/08/magento-themes-part-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 338/350 objects using disk: basic

Served from: matty.co.za @ 2012-02-05 09:12:19 -->
