<?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>SpinOneSolutions &#187; CMS</title>
	<atom:link href="http://www.spinonesolutions.com/tag/cms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spinonesolutions.com</link>
	<description>I waste my time so that you don't have to...</description>
	<lastBuildDate>Mon, 16 May 2011 17:01:16 +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>Magento CMS Tags (Directives)</title>
		<link>http://www.spinonesolutions.com/2010/04/magento-cms-tags-directives/</link>
		<comments>http://www.spinonesolutions.com/2010/04/magento-cms-tags-directives/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 15:00:57 +0000</pubDate>
		<dc:creator>Will Wright</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[CMS]]></category>

		<guid isPermaLink="false">http://www.spinonesolutions.com/?p=575</guid>
		<description><![CDATA[Here is, I think, a comprehensive list of tags (directives) available for use within the Magento CMS.  You can use these either in static blocks or CMS pages. Magento: Enterprise ver 1.6.0.0 block Description Outputs a virgin block or loads a defined block. Parameters type : Type of block to be created. id : Id [...]]]></description>
			<content:encoded><![CDATA[<p>Here is, I think, a comprehensive list of tags (directives) available for use within the Magento CMS.  You can use these either in static blocks or CMS pages.</p>
<p>Magento: Enterprise ver 1.6.0.0</p>
<h2>block</h2>
<p><span style="text-decoration: underline;">Description</span><br />
Outputs a virgin block or loads a defined block.</p>
<p><span style="text-decoration: underline;">Parameters</span><br />
<strong>type : </strong>Type of block to be created.<br />
<strong>id : </strong>Id of block to be created.<br />
<strong>output : </strong>The block instance method to call after creation.  If blank &#8220;toHtml()&#8221; will be called by default.<br />
<strong>&lt;parameter&gt; : </strong>Any additional parameters will get key value pairs set in the block&#8217;s Data array.</p>
<p><span style="text-decoration: underline;">Usage</span><br />
{{block type=&#8221;cms/block&#8221;}}<br />
Results in a virgin static block with no data.</p>
<p>{{block id=&#8221;myBlock&#8221;}}<br />
Results in an instance of <strong>myBlock</strong>.</p>
<p>{{block id=&#8221;myBlock&#8221; param1=&#8221;foo&#8221; param2=&#8221;bar&#8221;}}<br />
Results in an instance of <strong>myBlock</strong> with a data array containing key value pairs param1=&gt;&#8221;foo&#8221; param2=&gt;&#8221;bar&#8221;.</p>
<p>{{block id=&#8221;myBlock&#8221; output=&#8221;myMethod&#8221;}}<br />
Results in an instance of <strong>myBlock</strong> after it has called member method <strong>myMethod</strong>.</p>
<p>Note that if you already HAVE a block with this particular ID than it will be loaded.  This is great if you want to include a static block into a CMS page or into another static block!  Just create the block in the CMS section of admin and use the ID that you set.</p>
<p>Any parameter that your block class is sensitive too will work as well.  For example:</p>
<p>{{block id=&#8221;myBlock&#8221; template=&#8221;customfolder/customTemplate.phtml&#8221;}}<br />
Results in an instance of <strong>myBlock</strong> using a custom template.</p>
<h2>layout</h2>
<p><span style="text-decoration: underline;">Description</span><br />
Outputs the contents of the defined layout.</p>
<p><span style="text-decoration: underline;">Parameters<br />
</span><strong>area : </strong>The<strong> </strong>area to load.  If blank the layout&#8217;s default area will be used.<br />
<strong>handle : </strong>The layout handle to load.<br />
<strong>&lt;parameter&gt; : </strong>Any additional parameters will get key value pairs set in the layout&#8217;s Data array.</p>
<p><span style="text-decoration: underline;">Usage<br />
</span>{{layout handle=&#8221;default&#8221;}}<br />
Outputs the <strong>default</strong> layout handle.</p>
<h2>skin</h2>
<p><span style="text-decoration: underline;">Description</span><br />
Outputs the url for a resource in the current skin.</p>
<p><span style="text-decoration: underline;">Parameters<br />
</span><strong>url : </strong>The url to reference within the current skin directory.<br />
<strong>&lt;parameter&gt; : </strong>Any additional parameters will be passed to the getSkinUrl() method.</p>
<p><span style="text-decoration: underline;">Usage</span><br />
{{skin url=&#8221;images/myimage.gif&#8221;}}<br />
Outputs: http://www.mydomain.com/skin/frontend/default/default/images/myimage.gif<br />
Note: This assumes the current theme and skin are default.</p>
<h2>media</h2>
<p><span style="text-decoration: underline;">Description</span><br />
Outputs the Base Media URL.</p>
<p><span style="text-decoration: underline;">Parameters<br />
</span><strong>url : </strong>The url to prefix with the base media url.</p>
<p><span style="text-decoration: underline;">Usage</span><br />
{{media url=&#8221;images/myimage.gif&#8221;}}<br />
Outputs: http://www.mydomain.com/media/images/myimage.gif<br />
Note: This assumes Base Media URL is set to http://www.mydomain.com/media (See Admin-&gt;Configuration-&gt;Web)</p>
<h2>store</h2>
<p><span style="text-decoration: underline;">Description</span><br />
Outputs the store specific Base URL.</p>
<p><span style="text-decoration: underline;">Parameters<br />
</span><strong>direct_url : </strong>The url to prefix with the Base URL.  Note this method does NOT assume internal routing.<br />
<strong>url : </strong>The url to prefix with the Base URL.  Note this method DOES assume internal routing.<br />
<strong>&lt;parameter&gt; : </strong>Any additional parameters will be passed to the getSkinUrl() method.</p>
<p><span style="text-decoration: underline;">Usage<br />
</span>{{store direct_url=&#8221;images/myimage.gif&#8221;}}<br />
Outputs: http://www.mydomain.com/images/myimage.gif</p>
<p>{{store url=&#8221;mens&#8221;}}<br />
Outputs: http://www.mydomain.com/mens/</p>
<p>Note that the Base URL can be different in a multistore setup.</p>
<h2>htmlescape</h2>
<p><span style="text-decoration: underline;">Parameters<br />
</span><strong>var : </strong>The string to be html escaped.<br />
<strong>allowed_tags : </strong>Tags to be allowed in the escaped string</p>
<p><span style="text-decoration: underline;">Usage</span><br />
{{htmlescape var=&#8221;&lt;a href=&#8217;#'&gt;Click Here&lt;/a&gt;&#8221;}}<br />
Outputs: &lt;a href=&#8217;#'&gt;Click Here&lt;/a&gt;<br />
Note: The string is escaped so that the browser does not interpret it as HTML, instead it&#8217;s displayed as a human readable string.</p>
<h2>var</h2>
<p><span style="text-decoration: underline;">Description<br />
</span>Outputs template variables.</p>
<p><span style="text-decoration: underline;">Parameters</span><br />
<strong>variable</strong> : The variable being requested</p>
<p><span style="text-decoration: underline;">Usage<br />
</span>{{var myVariable}<br />
Outputs: Value stored in <strong>myVariable</strong></p>
<h2>protocol</h2>
<p><span style="text-decoration: underline;">Description</span><br />
Outputs the proper protocol (HTTP or HTTPS) depending on current context OR outputs the desired url based on the current protocol.</p>
<p><span style="text-decoration: underline;">Parameters</span><br />
<strong>store : </strong>The desired store<br />
<strong>url : </strong>The url to prefix with the proper protocol<br />
<strong>http : </strong>The url to use if the current protocol is HTTP<br />
<strong>https:</strong> The url to use if the current protocol is HTTPS</p>
<p><span style="text-decoration: underline;">Usage</span><br />
{{protocol url=&#8221;www.mydomain.com/images/checkout/cart.gif&#8221;}}<br />
Outputs: http://www.mydomain.com/images/checkout/cart.gif IF current protocol is HTTP<br />
Outputs: https://www.mydomain.com/images/checkout/cart.gif IF current protocol is HTTPS</p>
<p>{{protocol http=&#8221;http://unsecure.mydomain.com/images/checkout/cart.gif&#8221; https=&#8221;https://secure.mydomain.com/images/checkout/cart.gif&#8221;}}<br />
Outputs: http://unsecure.mydomain.com/images/checkout/cart.gif IF current protocol is HTTP<br />
Outputs: https://secure.mydomain.com/images/checkout/cart.gif IF current protocol is HTTPS</p>
<p>All of these directives are defined in Mage/Core/Model/Email/Template/Filter.php should you want to explore them further.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spinonesolutions.com/2010/04/magento-cms-tags-directives/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

