<?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>SkyBlueCanvas&#187; Fragmentor Plugin for SkyBlueCanvas &#8211; SkyBlueCanvas</title>
	<atom:link href="http://blog.skybluecanvas.com/tag/skins/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.skybluecanvas.com</link>
	<description>The Lightweight Blog</description>
	<lastBuildDate>Tue, 20 Jul 2010 15:47:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Fragmentor Plugin for SkyBlueCanvas</title>
		<link>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/plugins/fragmentor-plugin-skybluecanvas/</link>
		<comments>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/plugins/fragmentor-plugin-skybluecanvas/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 01:19:46 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Fragments]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[fragment]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[s]]></category>
		<category><![CDATA[skin]]></category>
		<category><![CDATA[skins]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[views]]></category>
<category>extensions</category><category>fragments</category><category>plugins</category><category>skins</category><category>templates</category><category>themes</category>
		<guid isPermaLink="false">http://blog.skybluecanvas.com/?p=59</guid>
		<description><![CDATA[Fragmentor is a plugin to be used instead of or alongside the default Fragment Plugin in SkyBlueCanvas. Fragmentor provides template and fragment developers an alternative and much more flexible syntax for loading dynamic content views (fragments) into SkyBlueCanvas web pages. Since the plugin uses a different syntax from the default fragment plugin, it will not conflict with it. With Fragmentor, you can pass an arbitrary number of key=&#60; value pairs of data from your article text or template file.]]></description>
			<content:encoded><![CDATA[<p>For a really cool Fragmentor usage example, check out my blog post on the <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/editable-sidebar-content-hack/" title="Editable Sidebar Hack">Editable Sidebar Content Hack</a></p>
<h2>System Requirements</h2>
<ul>
<li>SkyBlueCanvas v1.1</li>
<li>PHP 5 (Not tested with PHP 4)</li>
<li>Apache Web Server</li>
</ul>
<div class="msg-info">
<h2>Important</h2>
<p>Unlike most SkyBlueCanvas Plugins, the Fragmentor Plugin <strong><em>must</em></strong> be installed manually via FTP. If you install this Plugin through the admin console, it will not function properly.</p>
</div>
<h2>Installation Instructions</h2>
<ol>
<li>Connect to your SkyBlueCanvas web site using the FTP Client of your choice.</li>
<li>Locate the Fragmentor Plugin file in <span style="text-decoration: underline;">source/plugin_fragmentor/plugin.fragmentor.php</span> in this download.</li>
<li>Upload the Fragmentor Plugin file to <span style="text-decoration: underline;">/skyblue_root/data/plugins/</span>.</li>
</ol>
<h2>Usage</h2>
<p>The Fragmentor Plugin allows you to pass a standard query string, similar to a URL query string, to your custom SkyBlueCanvas fragments. A query string is simply a string of key=&gt;value pairs in the format:</p>
<pre class="html">key1=value1&amp;key2=value2</pre>
<h2>Reserved Keywords</h2>
<p>The Fragmentor Plugin has 2 reserved keywords:</p>
<ol>
<li> name<em> &#8211; name</em> tells Fragmentor which Fragment to laod.</li>
<li> view<em> &#8211; view</em> tells Fragmentor which Fragment View to load.</li>
</ol>
<h2>Syntax</h2>
<p>You can use one of or a mix of two call syntaxes to call the Fragmentor Plugin:</p>
<h3>HTML Comment Syntax:</h3>
<pre class="html">&lt;!--fragment(name=fragment_name&amp;view=view_name&amp;key1=value1)--&gt;</pre>
<p>Use this syntax to add Fragmentor calls to your HTML skin templates.</p>
<h3>In-line Text Syntax:</h3>
<pre class="html">{fragment(name=fragment_name&amp;view=view_name&amp;key1=value1)}</pre>
<p>Use this syntax to add Fragmentor calls in-line in your page article text.</p>
<p>If you are familiar with SkyBlueCanvas Fragments, you know that the default Fragment Plugin attempts to load any data objects associated with the fragment automatically. The plugin determines the data to load based on the name of the fragment. For instance, if you have the Links Manager installed on your SkyBlueCanvas site, and you create a fragment named <em>links</em>, the Fragment Plugin will automatically load the <em>links</em> data objects. The data objects are passed to your fragment in a variable named $data;</p>
<p>Fragmentor maintains this automatic data loading and your data is still passed in the $data variable. Fragmentor, however, adds a new variabled named $params which is a keyed (associative) array corresponding to the key=&gt;value pairs of your query string.</p>
<p>Your query string can contain as many key=&gt;value pairs as you like and your key names can be anything you like. The only limitations are:</p>
<ol>
<li>The <em>name</em> and <em>view</em> keywords are reserved by the plugin</li>
<li>Your query string must be a well-formed query string meaning it must follow the rules or a standard URL query string (no spaces, no special characters, etc.)</li>
</ol>
<div class="msg-info">
<h2>Important</h2>
<p>Existing SkyBlueCanvas fragments are not currently configured to work with the Fragmentor Plugin. Fragmentor is intended to give you more flexibility in creating<strong><em> your custom plugins</em></strong>. We may eventually merge Fragmentor with the core SkyBlueCanvas code but at the present time it should be considered and treated like any other third-party add-on.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/plugins/fragmentor-plugin-skybluecanvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting Themes for SkyBlueCanvas</title>
		<link>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/converting-themes-skybluecanvas/</link>
		<comments>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/converting-themes-skybluecanvas/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 20:14:19 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Skins and Templates]]></category>
		<category><![CDATA[SkyBlueCanvas CMS]]></category>
		<category><![CDATA[fragment]]></category>
		<category><![CDATA[fragments]]></category>
		<category><![CDATA[skin]]></category>
		<category><![CDATA[skins]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tutorials]]></category>
<category>conversion</category><category>fragments</category><category>html</category><category>skins</category><category>templates</category><category>themes</category>
		<guid isPermaLink="false">http://blog.skybluecanvas.com/?p=55</guid>
		<description><![CDATA[One of the most common questions we are asked is how to convert existing or stock HTML templates to work with 
SkyBlueCanvas. In this article I will guide you, step-by-step, through the process of adapting 
any existing skin to work with SkyBlueCanvas. This process, once you understand the fundamentals, 
usually takes about an hour - sometimes even less. In fact, the skin we will use in this tutorial 
took only 30 minutes.]]></description>
			<content:encoded><![CDATA[<p>One of the most common questions we are asked is how to convert existing or stock HTML templates to work with SkyBlueCanvas. In this article I will guide you, step-by-step, through the process of adapting any existing skin to work with SkyBlueCanvas. This process, once you understand the fundamentals, usually takes about an hour &#8211; sometimes even less. In fact, the skin we will use in this tutorial took only 30 minutes.</p>
<p>For this demonstration I will be using the Eco Theme from ThemeForest.net. Since this is a copyrighted theme, I won&#8217;t be able to give you the code for download, but you can purchase the template for only $12 from <a rel="nofollow" href="http://themeforest.net/item/eco-theme/22099?ref=skybluecanvas">ThemeForest.net</a>. I selected this theme because it&#8217;s beautiful, and it has all of the elements we need to learn how to adapt just about any skin for SkyBlueCanvas.</p>
<p><img style="padding: 1px; border: 1px solid #CCC; margin-bottom: 8px;" src="http://blog.skybluecanvas.com/images/eco.jpg" alt="Eco theme screen shot" width="200" height="150" /></p>
<p>The Eco Theme from <a rel="nofollow" href="http://themeforest.net/item/eco-theme/22099?ref=skybluecanvas">ThemeForest.net</a></p>
<h2>The Basics</h2>
<p>Since all of the HTML, CSS and JavaScript code has already been written by the theme author, our task will involve:</p>
<ul>
<li>Replacing content blocks with SkyBlueCanvas fragments</li>
<li>Replacing hard-coded page links with SkyBlueCanvas links</li>
<li>Updating CSS and JavaScript links for SkyBlueCanvas</li>
</ul>
<div class="msg-info">
<h2>Tip</h2>
<p>If you have not read our articles on <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-v11-rc1-skins-explained/">SkyBlueCanvas Skins</a> and <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-fragments-explained/">SkyBlueCanvas Fragments</a>, you may want to do so to get a full understanding of how SkyBlueCanvas creates a page.</p>
</div>
<p>Before we start, we need to create our skin directory structure. Create a new directory named eco with the following sub-folders:</p>
<p><img class="diagram" src="http://blog.skybluecanvas.com/images/diagram.skin.structure.jpg" alt="SkyBlueCanvas Skin directory structure" width="464" height="199" /></p>
<p>Next, copy the <span class="file-name">index.html</span> file from the Eco Theme to your new eco directory and rename it to <span class="file-name">skin.default.html</span>. Now copy the new eco directory to <span class="file-path">/skyblue/data/skins/</span>. Be sure to change the file permissions as needed for your hosting environment.</p>
<p>First, we need to add our links to the CSS and JavaScript files. Let&#8217;s take a look at the HTML HEAD element:</p>
<pre class="html">&lt;head&gt;
&lt;meta http-equiv="Content-Type"
  content="text/html; charset=UTF-8" /&gt;
&lt;title&gt;The Eco Company Site Template&lt;/title&gt;
&lt;link rel="stylesheet"
  href="css/style.css"
  type="text/css"
  media="screen" /&gt;
&lt;script src="js/jquery-1.2.6.js"
  type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/jquery.scrollTo-1.3.3.js"
  type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/jquery.localscroll-1.2.5.js"
  type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/jquery.serialScroll-1.2.1.js"
  type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/coda-slider.js"
type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;
</pre>
<p>You will notice that the paths for the CSS and JavaScript files all point to the relative paths within the skin directory. These won&#8217;t work from the front-end of your site but they are easily updated. I will just show you how to update one JavaScript and one CSS link. The others will be done the same way.</p>
<p>You will need one simple bit of PHP code to get the path to the currently active skin in SkyBlueCanvas:</p>
<pre class="php">&lt;?php echo $this-&gt;get_path(); ?&gt;
</pre>
<p>So we just need to add this code before the existing paths in the Eco Theme code:</p>
<pre class="html">&lt;head&gt;
&lt;link rel="stylesheet"
  href="&lt;?php echo $this-&gt;get_path(); ?&gt;css/style.css"
  type="text/css" media="screen" /&gt;
&lt;script src="&lt;?php echo $this-&gt;get_path(); ?&gt;js/jquery-1.2.6.js"
  type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;
</pre>
<p>Next, let&#8217;s tackle the header. This will be very easy. I will give you the code, then explain it.</p>
<pre class="html">&lt;div id="logo"&gt;
  &lt;h1&gt;&lt;a href="[[site.url]]"&gt;
    &lt;img src="images/logo.gif" alt="[[site.name]] logo" /&gt;
  &lt;/a&gt;&lt;/h1&gt;
&lt;/div&gt;
</pre>
<p>That&#8217;s it. All we have done is replaced the hard-coded URL of the home page and the site name with two SiteVars. Now, when our page is rendered, SkyBlueCanvas will replace these with the values you set in the SkyBlueCanvas admin.</p>
<div class="msg-info">
<h2>Tip</h2>
<p>You can find a full list of SiteVars in our article about the<br />
<a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-sitevars-plugin/">SkyBlueCanvas SiteVars Plugin</a>.</p>
</div>
<p>Now we will do the same for the Contacts region of the header:</p>
<pre class="html">&lt;div id="contacts"&gt;
  &lt;!-- Contact informations here --&gt;
  &lt;p&gt;
    Call us at [[site.contact_phone]] &lt;br /&gt;
    &lt;a href="mailto:[[site.contact_email]]"&gt;
      [[site.contact_email]]
    &lt;/a&gt;
  &lt;/p&gt;
  &lt;!-- End of Contact informations --&gt;
&lt;/div&gt;
</pre>
<p>Next, let&#8217;s replace the hard-coded dynamic content blocks. Converting content blocks involves two SkyBlueCanvas concepts: Fragments and SiteVars (which we already mentioned). Fragments are scriptlets that render a particular kind of content &#8211; like a Links List &#8211; created by SkyBlueCanvas. SiteVars are tokens that refer to settings or values that you set in the SkyBlueCanvas admin. They allow you to change values related to your site, without having to change your HTML every time you update your site settings.</p>
<p>In the Eco Theme <span class="file-name">index.html</span> file, we find the following code for the header and navigation:</p>
<pre class="html">&lt;div id="header"&gt;
  &lt;div id="logo"&gt;
    &lt;h1&gt;&lt;a href="index.html"&gt;
      &lt;img src="images/logo.gif"
        alt="The Eco Company Site Template logo" /&gt;
      &lt;/a&gt;&lt;/h1&gt;
  &lt;/div&gt;
  &lt;div id="contacts"&gt;
    &lt;!-- Contact informations here --&gt;
    &lt;p&gt;
      Call us on 001123456 &lt;br /&gt;
      &lt;a href="mailto:info@ecocompany-theme.com"&gt;
        info@ecocompany-theme.com
      &lt;/a&gt;
    &lt;/p&gt;
    &lt;!-- End of Contact informations --&gt;
  &lt;/div&gt;
  &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;ul id="mainmenu"&gt;
   &lt;!-- Put your menu links here --&gt;
   &lt;li&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="about-us.html"&gt;About Us&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="#"&gt;Services&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="#"&gt;Partners&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="contact.html"&gt;Contact&lt;/a&gt;&lt;/li&gt;
   &lt;!-- End of menu links --&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>You can update the contact info using SiteVars like I explained earlier. We will replace the navigation with a fragment to be dynamically updated as we add and delete pages from our site. But you don&#8217;t need to write a fragment. You can simply download this fragment set: <a href="http://www.skybluecanvas.com/exts/55">Fragments</a> and copy the entire directory to <span class="file-path">/skyblue/data/skins/eco/</span>.</p>
<p>After you have downloaded the fragment, we need to make one small change to the menu fragment. So open <span class="file-path">/fragments/menu/view.php</span> and Find the line that reads &lt;ul&gt; and change it to:</p>
<pre class="html">&lt;ul id="mainmenu"&gt;
</pre>
<p>We have simply added an ID to the UL element to match the Eco Theme style rules. I could have done this for you, but I wanted you to learn how to modify a fragment to match the template you are converting.</p>
<p>Now we can finish the header by adding the code to load the fragment when the page is created. We do that like this:</p>
<pre class="html">&lt;div id="header"&gt;
  &lt;div id="logo"&gt;
    &lt;h1&gt;&lt;a href="[[site.url]]"&gt;
      &lt;img src="images/logo.gif" alt="[[site.name]] logo" /&gt;
    &lt;/a&gt;&lt;/h1&gt;
  &lt;/div&gt;
  &lt;div id="contacts"&gt;
      &lt;!-- Contact informations here --&gt;
    &lt;p&gt;
      Call us at [[site.contact_phone]] &lt;br /&gt;
      &lt;a href="mailto:[[site.contact_email]]"&gt;
        [[site.contact_email]]
      &lt;/a&gt;
    &lt;/p&gt;
    &lt;!-- End of Contact informations --&gt;
  &lt;/div&gt;
  &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;!--#plugin:fragment(menu,view)--&gt;
&lt;/div&gt;
</pre>
<p>Now our header is finished. If you are starting to suspect that this is pretty easy &#8211; you are right &#8211; it is.</p>
<p>I want to focus on helping you learn the concepts not convert a specific theme so we are going to skip the Scrolling Banner section for now. I have included the fragment required for that section in the file you just downloaded.</p>
<h2>The Main Content</h2>
<p>The main content, or body of a standard text page is created and edited in the <acronym title="What You See is What You Get">WYSIWYG</acronym> text editor in the Page Manager. We only need to tell SkyBlueCanvas where to place the content. This is accomplished using the Page Fragment that is included in the fragments download from earlier in this article.</p>
<p>The Page Fragment is just like any other fragment and is loaded the same way. So find the region of the Eco theme that the designer has designated as the maincontent area.</p>
<pre class="html">&lt;div id="main"&gt;
  &lt;div id="sidebar"&gt;
    &lt;!-- We will come back to the side bar shortly --&gt;
  &lt;/div&gt;

  &lt;div id="text"&gt;
    &lt;!-- Put your text here --&gt;

    &lt;!-- End of Text --&gt;
  &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>The designer, Darinka, has conveniently labeled the content area with a comment indicating that to &#8220;Put your text here&#8221;, so that is what we will do. So delete the sample content she has placed between the comments, with our Page Fragment call like this:</p>
<pre class="html">&lt;div id="main"&gt;
  &lt;div id="sidebar"&gt;
    &lt;!-- We will come back to this --&gt;
  &lt;/div&gt;

  &lt;div id="text"&gt;
    &lt;!-- Put your text here --&gt;
    &lt;!--#plugin:fragment(page,view)--&gt;
    &lt;!-- End of Text --&gt;
  &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Now, when SkyBlueCanvas builds the page, it will replace the fragment call with the text we created for this page in the Page Manager.</p>
<h2>The Side Bar</h2>
<p>The side bar provides us with a good opportunity to talk a little about the usefulness of fragments and how to plan your pages when building or converting a skin for SkyBlueCanvas. We want updating our site to be as little work as possible. This means avoiding repeating or duplicating tasks and code. In fact, there is a concept in programming called <acronym title="Don't Repeat Yourself">DRY</acronym>.</p>
<p>Fragments allow us to write a single piece of code for regions of a page that will be the same for every page and every type of page. Typically our header, footer and often the side bar will be the same for every page, so we don&#8217;t want to duplicate the same code for every layout type we have. We can simply create a fragment and load the fragment in each layout style.</p>
<p>There is also even better news &#8211; fragments can be nested, so your fragments can also load fragments. For instance, if our side bar will include a Links List, we can have a side bar fragment which includes a fragment call to load the Links fragment. And this is exactly what we are going to create now.</p>
<p>I purposefully did not include the Sidebar Fragment in the download I gave you. I want you to experience writing a fragment of your own &#8211; and this is a very simple one.</p>
<p>Inside the <span class="file-path">/skyblue/data/skins/eco/fragments/</span> folder, create a new folder named <span class="file-name">sidebar</span>. Inside of this folder we need to create a sinlge PHP file named <span class="file-name">view.php</span>. View is the name of the default HTML output agent in a fragment. You can have an unlimited number of agents and you can name them anything you like, but we will use view for this example.</p>
<p>We want to inlude our Links List in the side bar, so our Sidebar Fragment View File needs to inlude the call to the Links Fragment. You are probably catching on by now and already know that we do this with the following code:</p>
<pre class="html">&lt;!--#plugin:fragment(links,view)--&gt;
</pre>
<p>Now you simply save the file. But wait, we have not actually called the Sidebar Fragment from within our page yet. We need to go back a bit and re-visit the code we modified to load the page text, and &#8211; as you probably guessed &#8211; add a fragment call to our Sidebar Fragment like this:</p>
<pre class="html">&lt;div id="main"&gt;
  &lt;div id="sidebar"&gt;
    &lt;!--#plugin:fragment(sidebar,view)--&gt;
  &lt;/div&gt;

  &lt;div id="text"&gt;
    &lt;!-- Put your text here --&gt;
    &lt;!--#plugin:fragment(page,view)--&gt;
    &lt;!-- End of Text --&gt;
  &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>If you recall, I said that <span class="file-name">view.php</span> is the default view of a fragment. So in our code above, the second parameter &#8216;view&#8217;, is not really necessary. We can load the default fragment view by simply calling:</p>
<pre class="html">&lt;!--#plugin:fragment(sidebar)--&gt;
</pre>
<p>The rest of this page, and the other page layouts can be converted in the same way that we have converted the elements above. I will leave the remaining elements and pages to you. You now have all of the tools you need to convert just about any HTML theme to work with SkyBlueCanvas.</p>
<p>Since I know this is your first theme conversion, I&#8217;m sure you will have questions. Please feel free to post questions in the <a href="http:forum.skybluecanvas.com">SkyBlueCanvas Forum</a>. I try to respond within 24 hours and usually much sooner than that.</p>
<h2>A Few Caveats</h2>
<p>In this article we covered converting a basic text page template for SkyBlueCanvas. What we did not cover, however, is how to create a layout for a contact form, photo gallery or other content page that includes non-text content in the body of the page.</p>
<p>This is actually quite easy to do, and there are two ways to do it. Whether your non-text page is a contact form, photo gallery or perhaps a Flash animation, they are all fragments and therefor loaded in the same way as every other fragment.</p>
<p>You have a choice with these fragments. You can create a new page layout that is specific to the content &#8211; <span class="file-name">skin.contact.html</span> &#8211; for instance, or you can just load the fragment in a standard text page, thus using only a single layout file.</p>
<h3>Required Skin Structure</h3>
<p>As you may be aware, in v1.1 we changed the way SkyBlueCanvas skins and content publishing works. The new format gives the site designer much greater flexibility and makes content publishing simpler for the site owner. We did not want to break compatibility with the old skin format so SkyBlueCanvas can still deal with both. In order to determine which skin format is being used, SkyBlueCanvas looks for the HTML closing tag &lt;/html&gt; in the skin for whichever page is being rendered. If the closing tag is not present, SkyBlueCanvas assumes the skin is a legacy skin.</p>
<p>What this means to you when building a skin is that if you are building a skin following the new format (which you most likely will be), you must include the &lt;/html&gt; tag in the skin.{skin_name}.html file (as opposed to in a fragment).</p>
<h3>Standard Page Approach</h3>
<p>If you want to use a single page layout for all of your pages, you can create non-text or text and fragment pages, by using the in-text fragment call to load your fragment. It is very simple to do. Create a new page, for instance Contact, then in the text editor in the Page Manager,include the following token:</p>
<pre class="html">{plugin:fragment(contacts,view)}
</pre>
<h3>Content-specific Layout Approach</h3>
<p>If you prefer to use a content-specific layout (or page type), you can simply duplicate your standard page, but rather than include the page fragment call in the main content area:</p>
<pre class="html">&lt;!--#plugin:fragment(page,view)--&gt;
</pre>
<p>Replace it with the call to the fragment for that page:</p>
<pre class="html">&lt;!--#plugin:fragment(contacts,view)--&gt;
</pre>
<p>And that&#8217;s it. You now know how to convert just about any HTML theme, with an unlimited number of layouts, to work with SkyBlueCanvas.</p>
<h2>A Final Note</h2>
<p>In <span class="admin-path">Admin &gt; Pages &gt; Editor</span>, you will find a Page Type selector on the Meta Data tab. The options in this selector correspond to your HTML layout files. So if you have two layouts, <span class="file-name">skin.default.html</span> and <span class="file-name">skin.contact.html</span>, the Page Type selector will have the options default and contact. You will need to be sure to select the Page Type you wish SkyBlueCanvas to use to build each page.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/converting-themes-skybluecanvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating Menus in SkyBlueCanvas v1.1</title>
		<link>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/creating-menus-skybluecanvas-v11/</link>
		<comments>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/creating-menus-skybluecanvas-v11/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 17:58:40 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Fragments]]></category>
		<category><![CDATA[SkyBlueCanvas CMS]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[fragment]]></category>
		<category><![CDATA[fragments]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[pages]]></category>
		<category><![CDATA[skin]]></category>
		<category><![CDATA[skins]]></category>
		<category><![CDATA[skybluecanvas]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[views]]></category>
<category>fragments</category><category>menus</category><category>skins</category><category>tutorials</category>
		<guid isPermaLink="false">http://blog.skybluecanvas.com/?p=53</guid>
		<description><![CDATA[When you create a new page in SkyBlueCanvas, a menu item is already created for you. In fact, there is not really a menu item to create because the system assumes, by default, that if you have created a page, there should be a menu link for. I mean, how else would anyone find your page if there is not link, right?]]></description>
			<content:encoded><![CDATA[<p>When you create a new page in SkyBlueCanvas, a menu item is already created for you. In fact, there is not really a menu item to create because the system assumes, by default, that if you have created a page, there should be a menu link to it. I mean, how else would anyone find your page if there is no link, right?</p>
<p>The only trouble is, which menu should the new page go in? This is where you will have to give SkyBlueCanvas a little help. On the Meta Data tab in the Page Manager (<span class="admin-path">Admin &gt; Pages &gt; Edit</span>), you will see a selector field labeled Menu. You simply select the menu in which you want the page to appear.</p>
<p>There are two logical next questions that you may have. (1) How do I create a new menu? (2) How does the menu get placed on a page? In this article I will answer these two questions.</p>
<p>The answer to question (1), &#8220;How do I create a new menu?&#8221; is very simple. You simply navigate to <span class="admin-path">Admin &gt; Collections &gt; Menus</span>. From the list view, click the &#8220;Add&#8221; button. In the form that appears:</p>
<p><img class="diagram" src="http://blog.skybluecanvas.com/images/menu.form.jpg" alt="Menu Manager form image" width="464" height="184" /></p>
<p>provide the requested information.</p>
<div class="msg-info">
<h2>Note</h2>
<p>The Menu Type property has been deprecated so you do not need to complete this field.</p>
</div>
<div class="msg-info">
<h2>Tip</h2>
<p>You will need to know the numeric ID of the new menu so make note of it and hold onto it.</p>
</div>
<p>Then click Save.</p>
<p>No you can go back to <span class="admin-path">Admin &gt; Pages &gt; Edit</span> (your page) and on the Meta Data tab, select your new menu from the options list and save your page.</p>
<p>You have now successfully created a new menu and added a page (menu item) to the new menu.</p>
<h2>Displaying a Menu</h2>
<p>Displaying your menu involves two other concepts in SkyBlueCanvas: <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-v11-rc1-skins-explained/">templates</a> and <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-fragments-explained/">fragments</a>.</p>
<p>Templates and fragments make up the presentation or &#8220;view&#8221; portion of your web page. They are where you define the HTML structure of pages (templates) and collections or content types (fragments). They may be a little tricky to grasp at first, but once you understand them, they are very powerful and flexible.</p>
<p>Your SkyBlueCanvas installation, provided you are using v1.1 RC1 or later, should already have a Menu Fragment included. We are going to modify this fragment, or add to it rather, first.</p>
<p>Using your FTP client, navigate to <span class="file-path">/skyblue_root/data/skins/techjunie/fragments/menu/</span> and make a copy of <span class="file-name">view.php</span>. Name the new file <span class="file-name">mymenu.php</span>. Then open the file with the text editor of your choice.</p>
<div class="msg-info">
<h2>Tip</h2>
<p>If you have installed your own skin, you can simply copy <span class="file-path">/skyblue_root/data/skins/techjunkie/fragments/</span> to your new skin.</p>
</div>
<p>In the file <span class="file-name">mymenu.php</span> you will see the following code:</p>
<pre class="php">&lt;?php
  global $Router;
  global $Filter;
?&gt;
&lt;div class="horizontal-menu"&gt;
  &lt;?php if (count($data)) : ?&gt;
  &lt;ul&gt;
    &lt;?php foreach ($data as $item) : ?&gt;
    &lt;?php if (not_valid_menu($item)) continue; ?&gt;
    &lt;li&lt;?php the_class($item); ?&gt;&gt;
      &lt;a href="&lt;?php the_link($item); ?&gt;"&gt;
          &lt;?php the_text($item); ?&gt;&lt;/a&gt;
    &lt;/li&gt;
    &lt;?php endforeach; ?&gt;
  &lt;/ul&gt;
  &lt;?php endif; ?&gt;
&lt;/div&gt;</pre>
<p>That looks pretty simple, huh?</p>
<p>We are going to need to modify the code a little bit but I promise it will be painless- and I will give you the full code when we are finished.</p>
<p>SkyBlueCanvas will know that this is a menu fragment (more on this later) so the menu items (actually the pages) will already be available to your code in the <span class="variable">$data</span> variable. We will only need to manually retrieve our new menu.</p>
<p>Now you can refer back to the Menu ID I asked you to hold onto.</p>
<pre class="php">&lt;?php

  /*
  * Set this to the ID of the menu you created
  */

  $my_menu_id = 3;

  /*
  * Get the new menu from storage
  */

  $menu = $Core-&gt;SelectObj(
    $Core-&gt;xmlHandler-&gt;ParserMain(SB_XML_DIR . "menus.xml"),
    $my_menu_id
  );
?&gt;</pre>
<p>Now we have our menu items and our new menu. We can start building the menu HTML.</p>
<p>We will start with a basic HTML structure:</p>
<pre class="php">&lt;div class="mymenu"&gt;
  &lt;?php if ($menu-&gt;showtitle) : ?&gt;
  &lt;h2&gt;&lt;?php echo $menu-&gt;title; ?&gt;&lt;/h2&gt;
  &lt;?php endif; ?&gt;
  &lt;ul class="verticalmenu"&gt;

  &lt;/ul&gt;
&lt;/div&gt;</pre>
<p>That&#8217;s not too bad. We are almost finished building our menu HTML. Now all we need to do is loop through the <span class="variable">$data</span> list, and display each of the items in our menu. Here is how the looping is done:</p>
<pre class="php">  &lt;?php foreach ($data as $item) : &gt;

  &lt;?php endforeach; ?&gt;</pre>
<p>We only want to show links to pages that are published, so we will add a single line to make sure the menu item can be displayed:</p>
<pre class="php">  &lt;?php foreach ($data as $item) : &gt;
  &lt;?php if (not_valid_menu($item)) continue; ?&gt;

  &lt;?php endforeach; ?&gt;</pre>
<p>Now we want to filter the <span>$data</span> items to only show items in our new menu. We do this with a single line of code:</p>
<pre class="php">  &lt;?php foreach ($data as $item) : &gt;
  &lt;?php if (not_valid_menu($item)) continue; ?&gt;
  &lt;?php if ($item-&gt;menu != $menu-&gt;id) continue ; ?&gt;

  &lt;?php endforeach; ?&gt;</pre>
<p>Wow! That was pretty easy and we are moving right along &#8230;</p>
<p>The only thing we have left to do is display the menu item:</p>
<pre class="php">  &lt;?php foreach ($data as $item) : &gt;
  &lt;?php if (not_valid_menu($item)) continue; ?&gt;
  &lt;?php if (!$item-&gt;menu == $my_menu_id) continue ; ?&gt;
  &lt;li&lt;?php the_class($item); ?&gt;&gt;
    &lt;a href="&lt;?php the_link($item); ?&gt;"&gt;
        &lt;?php the_text($item); ?&gt;&lt;/a&gt;
  &lt;/li&gt;
  &lt;?php endforeach; ?&gt;</pre>
<p>And believe it or not, you have  just built a new menu, as well as your first SkyBlueCanvas Fragment. There is only one last step, and this one is the simplest of all.</p>
<p>Up to this point, we have created a new Menu object in the SkyBlueCanvas admin and written a new menu Fragment. The only thing that remains is to tell SkyBlueCanvas where to display the fragment. To do this, go to <span class="file-path">/skyblue_root/data/skins/techjunkie/</span> (or your skin) and open <span class="file-name">skin.text.html</span> in your text editor. You will see the following code:</p>
<pre class="html">&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" {doc:lang}&gt;
  &lt;head&gt;
    &lt;title&gt;[[page.title]]&lt;/title&gt;
    &lt;meta http-equiv="Content-Type"
      content="text/html;charset=UTF-8" /&gt;
    &lt;?php echo $this-&gt;get_meta_data(); ?&gt;
    &lt;link rel="stylesheet"
    type="text/css"
    href="&lt;?php echo $this-&gt;get_path(); ?&gt;css/TechJunkie.css" /&gt;
    &lt;!--#plugin.preloader--&gt;
  &lt;/head&gt;
  &lt;body id="homepage"&gt;
    &lt;div id="wrap"&gt;
      &lt;!--#plugin:fragment(header)--&gt;
      &lt;div id="menu"&gt;
        &lt;!--#plugin:fragment(menu,view,menu=1)--&gt;
      &lt;/div&gt;
      &lt;div id="content-wrap"&gt;
        &lt;div id="main"&gt;
          &lt;!--#plugin:fragment(page,view)--&gt;
        &lt;/div&gt;
        &lt;div id="sidebar"&gt;
          &lt;!--#plugin:fragment(sidebar)--&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="footer-wrap"&gt;
        &lt;!--#plugin:fragment(footer)--&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre>
<p>Notice the lines that look like this:</p>
<pre class="html">&lt;!--#plugin:fragment(page,view)--&gt;&gt;</pre>
<p>These tokens are the code that tell SkyBlueCanvas where to load a fragment, which fragment to load, and which view (PHP file) to load. So the only thing you need to do is add a token for your new menu in the location in the HTML where you want the menu to appear. Let&#8217;s assume you want your new menu to appear at the top of the sidebar. You will change the code to look like this:</p>
<pre class="html">
<div id="sidebar">
 &lt;!--#plugin:fragment(menu,mymenu)--&gt;</div>
</pre>
<p>Now test your new menu by pointing your browser to your web site. Your new menu should appear at the top of the sidebar.</p>
<div class="msg-info">
<h2>Note</h2>
<p>You will need to make this change for all of the skins HTML files, <span class="file-name">skin.contacts.html</span> and <span class="file-name">skin.standard.html</span>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/creating-menus-skybluecanvas-v11/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>SkyBlueCanvas v1.1 RC1 Skins Explained</title>
		<link>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-v11-rc1-skins-explained/</link>
		<comments>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-v11-rc1-skins-explained/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 06:18:54 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Skins and Templates]]></category>
		<category><![CDATA[SkyBlueCanvas CMS]]></category>
		<category><![CDATA[rc1]]></category>
		<category><![CDATA[skins]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[themes]]></category>
<category>fragments</category><category>skins</category><category>tutorials</category>
		<guid isPermaLink="false">http://blog.skybluecanvas.com/?p=50</guid>
		<description><![CDATA[If you have used an earlier release of SkyBlueCanvas and are now upgrading to v1.1 RC1, you have probably noticed that the skins are a bit different. Normally, I would not want to make a change with as much impact on existing users as this one, but the change was really necessary.

This article will explain the underlying concepts of the new skin format and the API hooks at your disposal. For users of older versions of SkyBlueCanvas, your existing skins will still work. There are some minor caveats to this that I will explain later on. ]]></description>
			<content:encoded><![CDATA[<h2>SkyBlueCanvas v1.1 RC1 Skins Explained</h2>
<p>If you have used an earlier release of SkyBlueCanvas and are now upgrading to v1.1 RC1, you have probably noticed that the skins are a bit different. Normally, I would not want to make a change with as much impact on existing users as this one, but the change was really necessary.</p>
<p>This article will explain the underlying concepts of the new skin format and the API hooks at your disposal. For users of older versions of SkyBlueCanvas, your existing skins will still work. There are some minor caveats to this that I will explain later on.</p>
<h3>Push vs. Pull Content Publishing</h3>
<p>The old skin format used a &#8220;Push&#8221; method of publishing. What this means is that you specify what content items are published in what region of a page from within the Admin Control panel. This technique has many benefits, but, unfortunately, it also has many limitations.</p>
<p>The main problem with a push technique is that too much knowledge of the presentation of the data is attached to the data itself. This is generally frowned upon in software development because it does not allow the content to be easily published in other formats such as RSS, Mobile devices, etc.</p>
<p>The new skin format uses a &#8220;Pull&#8221; method of content publishing. This is widely accepted as the &#8220;correct&#8221; way to publish content from any type of content creation/management system. As with the push method, this technique has both advantages and disadvantages. However, the advantages of a pull method far outweigh the disadvantages.</p>
<h4>The Disadvantages</h4>
<p>The primary disadvantage of the pull method is that setting up skins is a bit more work and requires a higher level of technical skills. In SkyBlueCanvas, we have tried to minimize the extra labor as much as possible.</p>
<p>The other main disadvantage is that a new template is required for each &#8220;type&#8221; of content. For instance, a Photo Gallery page will require it&#8217;s own template. We are working on a solution to do away with this requirement but for now, this requirement will have to stand.</p>
<h4>The Advantages</h4>
<p>The biggest advantage, and in my opinion, the one that outweighs every other consideration, is the unlimited flexibility that the pull method affords the designer and developer. There are literally no limitations on what you can do.</p>
<p>Using the pull method of publishing, all knowledge of presentation is removed from the data itself. This means that you can create multiple (even unlimited) views of the same data. It also means that the format of the data can be anything you want or need it to be. The same data can be delivered as XML, RSS, HTML or any other format.</p>
<h3>Fragments</h3>
<p>The key to the new skin format is what we call fragments. An easy way to think about fragments is as a piece of a page. The fragment code creates the HTML for a particular data type. For instance, if you have a collection of Links you want to display on your site, the Links Fragment will take care of generating the HTML. One neat thing about fragments, though, is that a single fragment can have numerous different HTML formats.</p>
<p>You can find a full tutorial on Fragments in the post about <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-fragments-explained/">Fragments</a></p>
<h3>Basic Skin Structure</h3>
<p>The basic structure of a SkyBlueCanvas skin is the same as any other HTML page. It is also almost identical to the old SkyBlueCanvas skin structure expect that it includes the full HTML document including the Doc Type declaration and HEAD and BODY elements.</p>
<pre class="html">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" {doc:lang}&gt;
    &lt;head profile="http://gmpg.org/xfn/11"&gt;
        &lt;title&gt;Page Title&lt;/title&gt;
        &lt;meta http-equiv="content-type"
            content="text/html; charset=UTF-8" /&gt;
    &lt;/head&gt;
    &lt;body id="home"&gt;
        &lt;div id="doc"&gt;
            &lt;div id="header"&gt;

            &lt;/div&gt;
            &lt;div id="navigation"&gt;

            &lt;/div&gt;
            &lt;div id="body"&gt;
                &lt;div id="content"&gt;

                &lt;/div&gt;
                &lt;div id="sidebar"&gt;

                &lt;/div&gt;
                &lt;div class="clear"&gt;&lt;/div&gt;
                &lt;div id="footer"&gt;

                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>The code above simply defines the structure of your HTML skin. It does not include any content or resource links (JavaScript or CSS) or meta data. We&#8217;re going to add these &#8211; in dynamic fashion &#8211; now.</p>
<p>First, we will want to add our meta data. The meta data for pages is managed both page-by-page in the Page Manager and through Admin &gt; Collections &gt; Meta Data. This means you can add, edit and delete meta data items and they are updated on your site automatically. To load the meta data, you need only a single function call, inserted in the HEAD element of the page like this:</p>
<pre class="html">&lt;head profile="http://gmpg.org/xfn/11"&gt;
    &lt;title&gt;Page Title&lt;/title&gt;
    &lt;meta http-equiv="content-type"
        content="text/html; charset=UTF-8" /&gt;
    &lt;?php echo $this-&gt;get_meta_data(); ?&gt;
&lt;/head&gt;</pre>
<p>That&#8217;s all there is to it. And most features of the SkyBlueCanvas skin will be equally as simple. So let&#8217;s move on to loading JavaScript and CSS links. These will also be inserted in the HEAD element.</p>
<pre class="html">&lt;head profile="http://gmpg.org/xfn/11"&gt;
    &lt;title&gt;Page Title&lt;/title&gt;
    &lt;meta http-equiv="content-type"
        content="text/html; charset=UTF-8" /&gt;
    &lt;?php echo $this-&gt;get_meta_data(); ?&gt;
    &lt;link rel="stylesheet"
        type="text/css"
        href="&lt;?php echo $this-&gt;get_path(); ?&gt;css/mystyles.css"
        /&gt;
    &lt;script type="text/javascript"
        src="&lt;?php echo $this-&gt;get_path(); ?&gt;js/myscripts.js"&gt;
    &lt;/script&gt;
&lt;/head&gt;</pre>
<p>The &lt;?php echo $this-&gt;get_path(); ?&gt; function automatically fills in the path to the current skin so if you want to create a new skin based on the current structure, all you need to do is copy the HTML file to the new skin folder and you won&#8217;t even need to update the paths.</p>
<p>Ok, so now for the really hard part. Just kidding. This part is a bit different but just as simple. Now we want to load the page content. This example will be for a basic text page created in Admin &gt; Pages. I will use the full HTML document for this example so you can see a fully-functional page:</p>
<pre class="html">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" {doc:lang}&gt;
    &lt;head profile="http://gmpg.org/xfn/11"&gt;
        &lt;title&gt;Page Title&lt;/title&gt;
        &lt;meta http-equiv="content-type"
            content="text/html; charset=UTF-8" /&gt;
    &lt;/head&gt;
    &lt;body id="home"&gt;
        &lt;div id="doc"&gt;
            &lt;div id="header"&gt;

            &lt;/div&gt;
            &lt;div id="navigation"&gt;

            &lt;/div&gt;
            &lt;div id="body"&gt;
                &lt;div id="content"&gt;
                    &lt;!--#plugin:fragment(page)--&gt;
                &lt;/div&gt;
                &lt;div id="sidebar"&gt;

                &lt;/div&gt;
                &lt;div class="clear"&gt;&lt;/div&gt;
                &lt;div id="footer"&gt;

                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>That was pretty easy wasn&#8217;t it?</p>
<p>Now, let&#8217;s go ahead and put our full page together with navigation, a sidebar and header and footer:</p>
<pre class="html">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" {doc:lang}&gt;
    &lt;head profile="http://gmpg.org/xfn/11"&gt;
        &lt;title&gt;Page Title&lt;/title&gt;
        &lt;meta http-equiv="content-type"
            content="text/html; charset=UTF-8" /&gt;
    &lt;/head&gt;
    &lt;body id="home"&gt;
        &lt;div id="doc"&gt;
            &lt;div id="header"&gt;
                &lt;!--#plugin:fragment(header)--&gt;
            &lt;/div&gt;
            &lt;div id="navigation"&gt;
                &lt;!--#plugin:fragment(menu,view,menu=1)--&gt;
            &lt;/div&gt;
            &lt;div id="body"&gt;
                &lt;div id="content"&gt;
                    &lt;!--#plugin:fragment(page)--&gt;
                &lt;/div&gt;
                &lt;div id="sidebar"&gt;
                    &lt;!--#plugin:fragment(sidebar)--&gt;
                &lt;/div&gt;
                &lt;div class="clear"&gt;&lt;/div&gt;
                &lt;div id="footer"&gt;
                    &lt;!--#plugin:fragment(footer)--&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>Now, just save the above code to <span class="file-path">/skyblue_root/data/skins/your_skin/skin.standard.html</span></p>
<p>To use this template for a page, go to Admin &gt; Pages and create a new page. Enter your page text. Then on the Meta Data tab, set the Page Type to &#8220;standard&#8221;. When your new pages is requested, SkyBlueCanvas will use the template we created to build the page.</p>
<p>One final example will help round out your understanding of SkyBlueCanvas skins. This part is a little more difficult but still very simple. The example we have used so far only works for pages whose page type is set to Standard. What if you want a Gallery page?</p>
<p>You will need to read the article on <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-fragments-explained/">Fragments</a> in order to fully understand how this is done, but the page template itself, is almost identical to the Standard page, with one small change. Rather than including:</p>
<pre class="html">&lt;!--#plugin:fragment(page)--&gt;</pre>
<p>in the main content region, you will include:</p>
<pre class="html">&lt;!--#plugin:fragment(portfolio)--&gt;</pre>
<p>Full List of Template Hooks:</p>
<pre class="php">// Load the page meta data:

$this-&gt;get_meta_data();

// Getting the Skin root path:

$this-&gt;get_path();

// Getting the page title:

$this-&gt;get_page_title();

// Get the home page URL:

$this-&gt;get_home_url();

// Get the page name as a CSS ID:

$this-&gt;get_page_name();</pre>
<p>SkyBlueCanvas also has some additional hooks via the SiteVars plugin. The full list is beyond the scope of this article, but you can learn more in the blog post about <a href="http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-sitevars-plugin/">SiteVars</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.skybluecanvas.com/skybluecanvas-lightweight-cms/skybluecanvas-v11-rc1-skins-explained/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
