<?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>Agence de Développement Informatique du Nord &#187; layout</title>
	<atom:link href="http://blog.adin.pro/tag/layout/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adin.pro</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Dec 2019 08:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Magento &#8211; add something in the header section</title>
		<link>http://blog.adin.pro/2015-10-21/magento-add-something-in-the-section/</link>
		<comments>http://blog.adin.pro/2015-10-21/magento-add-something-in-the-section/#comments</comments>
		<pubDate>Wed, 21 Oct 2015 07:53:04 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=503</guid>
		<description><![CDATA[<p>If you need to add something in the header section of all your pages, you can go on your template and add it to the files 1column.phtml, 2columns-left.phtml, 2columns-right.phtml&#8230; You can, but you shouldn&#8217;t, it&#8217;s not a good practice. Let&#8217;s &#8230; <a href="http://blog.adin.pro/2015-10-21/magento-add-something-in-the-section/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-10-21/magento-add-something-in-the-section/">Magento &#8211; add something in the header section</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you need to add something in the header section of all your pages, you can go on your template and add it to the files 1column.phtml, 2columns-left.phtml, 2columns-right.phtml&#8230; You can, but you shouldn&#8217;t, it&#8217;s not a good practice.</p>
<p>Let&#8217;s see the content of one of this file</p>
<pre class="brush: php; title: ; notranslate">
&lt;head&gt;
&lt;?php echo $this-&gt;getChildHtml('head') ?&gt;
&lt;/head&gt;
</pre>
<p>You can see the <head> section will be filled with all &#8220;head&#8221; child block, so let&#8217;s create one.</p>
<p>On your layout file (design/frontend/adin/default/layout/adin_page.xml), add the declaration of your new block</p>
<pre class="brush: xml; title: ; notranslate">
&lt;layout version=&quot;0.1.0&quot;&gt;
    &lt;default&gt;
        &lt;reference name=&quot;head&quot; before=&quot;-&quot;&gt;
            &lt;block type=&quot;adin_page/headerstuff&quot; name=&quot;headerstuff&quot; as=&quot;headerstuff&quot; template=&quot;page/html/headerstuff.phtml&quot; /&gt;
        &lt;/reference&gt;
   &lt;/default&gt;
&lt;/layout&gt;
</pre>
<p>Create the block class in app/code/local/Adin/Page/Block/Headerstuff.php</p>
<pre class="brush: php; title: ; notranslate">
class Adin_Page_Block_Headerstuff extends Mage_Core_Block_Template
{
    public function _construct()
    {
    }
}
</pre>
<p>And create you template file app/design/frontend/adin/default/template/page/html/headerstuff.phtml</p>
<pre class="brush: php; title: ; notranslate">
&lt;!-- header my stuff to put in the header --&gt;
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-10-21/magento-add-something-in-the-section/">Magento &#8211; add something in the header section</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2015-10-21/magento-add-something-in-the-section/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
