<?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>The Magento Expert</title>
	<atom:link href="https://www.the-mage-expert.com/tag/template-phtml/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.the-mage-expert.com</link>
	<description>Your Magento Commerce Expert</description>
	<lastBuildDate>Tue, 24 Jan 2023 09:37:24 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.6</generator>
	<item>
		<title>Redirecting to any page from a template (phtml)</title>
		<link>https://www.the-mage-expert.com/639/magento-redirecting-to-any-page-from-template-phtml/</link>
		<comments>https://www.the-mage-expert.com/639/magento-redirecting-to-any-page-from-template-phtml/#comments</comments>
		<pubDate>Wed, 14 May 2014 08:13:11 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[template (phtml)]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=639</guid>
		<description><![CDATA[Use the code below to redirect to any page from a Magento template (phtml) file. In this case, it is a redirect to the home page. [crayon-6a7abfc5af224/]]]></description>
				<content:encoded><![CDATA[<p>Use the code below to redirect to any page from a Magento template (phtml) file. In this case, it is a redirect to the home page.</p>
<p></p><pre class="crayon-plain-tag">Mage::app()-&gt;getFrontController()-&gt;getResponse()-&gt;setRedirect(Mage::getBaseUrl());</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/639/magento-redirecting-to-any-page-from-template-phtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the category page column count programmatically</title>
		<link>https://www.the-mage-expert.com/636/magento-changing-column-count-category-page-programmatically/</link>
		<comments>https://www.the-mage-expert.com/636/magento-changing-column-count-category-page-programmatically/#comments</comments>
		<pubDate>Mon, 05 May 2014 09:37:45 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[category page]]></category>
		<category><![CDATA[template (phtml)]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=636</guid>
		<description><![CDATA[Add the following code to your themes catalog\product\list.phtml file. It will change the column count to 2. [crayon-6a7abfc5b9412/]]]></description>
				<content:encoded><![CDATA[<p>Add the following code to your themes <em>catalog\product\list.phtml</em> file. It will change the column count to 2.</p>
<p></p><pre class="crayon-plain-tag">$this-&gt;setColumnCount(2);</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/636/magento-changing-column-count-category-page-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a blocks HTML in a template (phtml)</title>
		<link>https://www.the-mage-expert.com/632/magento-getting-html-of-block-in-template-phtml/</link>
		<comments>https://www.the-mage-expert.com/632/magento-getting-html-of-block-in-template-phtml/#comments</comments>
		<pubDate>Mon, 05 May 2014 08:39:33 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[template (phtml)]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=632</guid>
		<description><![CDATA[The below code shows how to echo the HTML of a block with the id &#8216;my_block&#8217;. [crayon-6a7abfc5b990f/]]]></description>
				<content:encoded><![CDATA[<p>The below code shows how to echo the HTML of a block with the id &#8216;my_block&#8217;.</p>
<p></p><pre class="crayon-plain-tag">echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('my_block')-&gt;toHtml();</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/632/magento-getting-html-of-block-in-template-phtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending parameters to a static block</title>
		<link>https://www.the-mage-expert.com/124/magento-sending-parameters-to-static-block/</link>
		<comments>https://www.the-mage-expert.com/124/magento-sending-parameters-to-static-block/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 12:29:15 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[template (phtml)]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=124</guid>
		<description><![CDATA[You have to use so called filters to send parameters to a static block from a template for example. Lets take a look at the following code: Thats the static Magento block: [crayon-6a7abfc5ba0e7/] We want to send attributset_name and product_id&#8230;]]></description>
				<content:encoded><![CDATA[<p>You have to use so called filters to send parameters to a static block from a template for example. Lets take a look at the following code: </p>
<p>Thats the static Magento block:</p><pre class="crayon-plain-tag">&lt;a href=&quot;{{store url=''}}{{var attributset_name}}/configuration/test/product_id/{{var product_id}}&quot;&gt;
    konfigurieren
&lt;/a&gt;</pre><p>We want to send attributset_name and product_id dynamically to the block. Add the following code to a template for example:</p>
<p></p><pre class="crayon-plain-tag">$block = $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('block_name');
$variables = array();
$variables['product_id'] = 123;
$variables['attributset_name'] = 'whatever';
                       
$filter = Mage::getModel('core/email_template_filter');
$filter-&gt;setVariables($variables);

// This will now echo the blocks HTML with the values from the passed parameters.
echo $filter-&gt;filter($block-&gt;toHtml());</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/124/magento-sending-parameters-to-static-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding the message block to a template (phtml)</title>
		<link>https://www.the-mage-expert.com/35/magento-adding-message-block-to-template-phtml/</link>
		<comments>https://www.the-mage-expert.com/35/magento-adding-message-block-to-template-phtml/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 11:39:22 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[template (phtml)]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=35</guid>
		<description><![CDATA[If you want to show the Magento messages (success, error, &#8230;) in your template file, add the following code the top of your template: [crayon-6a7abfc5ba8be/]]]></description>
				<content:encoded><![CDATA[<p>If you want to show the Magento messages (success, error, &#8230;) in your template file, add the following code the top of your template:</p>
<p></p><pre class="crayon-plain-tag">&lt;?php echo $this-&gt;getMessagesBlock()-&gt;getGroupedHtml() ?&gt;</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/35/magento-adding-message-block-to-template-phtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
