<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Programatically create Magento blocks and inject them into layout</title>
	<atom:link href="http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/feed/" rel="self" type="application/rss+xml" />
	<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/</link>
	<description>Magento Design and Magento Development Professionals - Inchoo</description>
	<lastBuildDate>Tue, 22 May 2012 16:01:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jignesh Thummar</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-29133</link>
		<dc:creator>Jignesh Thummar</dc:creator>
		<pubDate>Sat, 19 May 2012 07:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-29133</guid>
		<description>@Branko Ajzele . its possible to inject block in default layout without using layout xml file? because this approach add block to current controller action but in case if i want something to inject in header of all the pages possible without layout xml?</description>
		<content:encoded><![CDATA[<p>@Branko Ajzele . its possible to inject block in default layout without using layout xml file? because this approach add block to current controller action but in case if i want something to inject in header of all the pages possible without layout xml?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amit vyas</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-29013</link>
		<dc:creator>amit vyas</dc:creator>
		<pubDate>Wed, 16 May 2012 07:57:35 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-29013</guid>
		<description>hii thanks for this helpful post, it is very helpful for me, bu i m having a problem when i m using it ,i cant access the functions in my block Mage_CatalogSearch_Block_Search a i have created a per your code where u have used Mage_Core_Block_Template class, can i use another class overhere?
 if yes then i have done it but it is giving me error pls send me reply asap</description>
		<content:encoded><![CDATA[<p>hii thanks for this helpful post, it is very helpful for me, bu i m having a problem when i m using it ,i cant access the functions in my block Mage_CatalogSearch_Block_Search a i have created a per your code where u have used Mage_Core_Block_Template class, can i use another class overhere?<br />
 if yes then i have done it but it is giving me error pls send me reply asap</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samit Rimal</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-28962</link>
		<dc:creator>Samit Rimal</dc:creator>
		<pubDate>Mon, 14 May 2012 13:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-28962</guid>
		<description>It is not working in magento 1.6.2 . How to solve it</description>
		<content:encoded><![CDATA[<p>It is not working in magento 1.6.2 . How to solve it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praful</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-28736</link>
		<dc:creator>Praful</dc:creator>
		<pubDate>Mon, 07 May 2012 06:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-28736</guid>
		<description>Hello,

I am trying add one or  more field when Export product grid to XML format.

public function exportXmlAction()
    {
        $fileName   = &#039;products.xml&#039;;
        $content    = $this-&gt;getLayout()-&gt;createBlock(&#039;enhancedgrid/catalog_product_grid&#039;)
            -&gt;getXml();

        $this-&gt;_sendUploadResponse($fileName, $content);
    }

I dont get idea how and where I have to change.

I wand add URL field in exported XML file...

please help me...

thanks
Praful</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I am trying add one or  more field when Export product grid to XML format.</p>
<p>public function exportXmlAction()<br />
    {<br />
        $fileName   = &#8216;products.xml&#8217;;<br />
        $content    = $this-&gt;getLayout()-&gt;createBlock(&#8216;enhancedgrid/catalog_product_grid&#8217;)<br />
            -&gt;getXml();</p>
<p>        $this-&gt;_sendUploadResponse($fileName, $content);<br />
    }</p>
<p>I dont get idea how and where I have to change.</p>
<p>I wand add URL field in exported XML file&#8230;</p>
<p>please help me&#8230;</p>
<p>thanks<br />
Praful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scott</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-27110</link>
		<dc:creator>scott</dc:creator>
		<pubDate>Sat, 03 Mar 2012 22:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-27110</guid>
		<description>I would also like to know how to create dynamic breadcrumbs for pages that don&#039;t have them.  Thanks.</description>
		<content:encoded><![CDATA[<p>I would also like to know how to create dynamic breadcrumbs for pages that don&#8217;t have them.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rao</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-25897</link>
		<dc:creator>Rao</dc:creator>
		<pubDate>Fri, 27 Jan 2012 07:09:52 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-25897</guid>
		<description>how can i create dynamic breadcrumbs for my custom module. i am in 80% of my first magento module construction and this is what i am on right now. kindly guide me. 
elegant.rao@gmail.com
thank you.</description>
		<content:encoded><![CDATA[<p>how can i create dynamic breadcrumbs for my custom module. i am in 80% of my first magento module construction and this is what i am on right now. kindly guide me.<br />
<a href="mailto:elegant.rao@gmail.com">elegant.rao@gmail.com</a><br />
thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: haifa</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-25526</link>
		<dc:creator>haifa</dc:creator>
		<pubDate>Mon, 09 Jan 2012 19:00:55 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-25526</guid>
		<description>thanks for this! helped me a lot!</description>
		<content:encoded><![CDATA[<p>thanks for this! helped me a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-23023</link>
		<dc:creator>Harry</dc:creator>
		<pubDate>Sat, 08 Oct 2011 09:22:17 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-23023</guid>
		<description>I dont want to use the core/template as a block type.. what if i want to use checkout/cart... i have tried the following code but its is not working.... 
[code]
 public function indexAction()
		{   
			//Get current layout state 
			$this-&gt;loadLayout();	
					
			$block = $this-&gt;getLayout()-&gt;createBlock(
				&#039;checkout/cart&#039;, // OR &#039;Mage_Checkout_Block_Cart&#039;
				&#039;my_block_name_here&#039;,
				array(&#039;template&#039; =&gt; &#039;custom/cart.phtml&#039;)
			);
			
			$this-&gt;getLayout()-&gt;getBlock(&#039;content&#039;)-&gt;append($block);
			$this-&gt;getLayout()-&gt;getBlock(&#039;root&#039;)-&gt;setTemplate(&#039;page/empty.phtml&#039;);

			//Release layout stream
			$this-&gt;renderLayout();
		}
[/code]
any suggestions will be highly appreciated.... Thanks you.</description>
		<content:encoded><![CDATA[<p>I dont want to use the core/template as a block type.. what if i want to use checkout/cart&#8230; i have tried the following code but its is not working&#8230;. </p>
<pre class="brush: plain; title: ; notranslate">
 public function indexAction()
		{
			//Get current layout state
			$this-&gt;loadLayout();	

			$block = $this-&gt;getLayout()-&gt;createBlock(
				'checkout/cart', // OR 'Mage_Checkout_Block_Cart'
				'my_block_name_here',
				array('template' =&gt; 'custom/cart.phtml')
			);

			$this-&gt;getLayout()-&gt;getBlock('content')-&gt;append($block);
			$this-&gt;getLayout()-&gt;getBlock('root')-&gt;setTemplate('page/empty.phtml');

			//Release layout stream
			$this-&gt;renderLayout();
		}
</pre>
<p>any suggestions will be highly appreciated&#8230;. Thanks you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neeraj</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-22460</link>
		<dc:creator>neeraj</dc:creator>
		<pubDate>Fri, 26 Aug 2011 07:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-22460</guid>
		<description>thanks Salik</description>
		<content:encoded><![CDATA[<p>thanks Salik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: salik</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-20335</link>
		<dc:creator>salik</dc:creator>
		<pubDate>Sun, 10 Apr 2011 18:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-20335</guid>
		<description>Use this for set layout of page

$template = Mage::getConfig()-&gt;getNode(&#039;global/page/layouts/two_columns_right/template&#039;);
$this-&gt;getLayout()-&gt;getBlock(&#039;root&#039;)-&gt;setTemplate($template);</description>
		<content:encoded><![CDATA[<p>Use this for set layout of page</p>
<p>$template = Mage::getConfig()-&gt;getNode(&#8216;global/page/layouts/two_columns_right/template&#8217;);<br />
$this-&gt;getLayout()-&gt;getBlock(&#8216;root&#8217;)-&gt;setTemplate($template);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Kudrenko</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-20032</link>
		<dc:creator>Oleg Kudrenko</dc:creator>
		<pubDate>Mon, 21 Mar 2011 21:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-20032</guid>
		<description>Hi!
I need to create many cms page programmatically. How can i do it, what methods i must use?</description>
		<content:encoded><![CDATA[<p>Hi!<br />
I need to create many cms page programmatically. How can i do it, what methods i must use?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eyal Peleg</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-13794</link>
		<dc:creator>Eyal Peleg</dc:creator>
		<pubDate>Mon, 27 Dec 2010 06:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-13794</guid>
		<description>I don&#039;t know what you are using for code formatting but at least on my MFC-440CN  it just prints out garbage instead of the code. :(</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know what you are using for code formatting but at least on my MFC-440CN  it just prints out garbage instead of the code. <img src='http://inchoo.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabio</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-8920</link>
		<dc:creator>Fabio</dc:creator>
		<pubDate>Wed, 03 Nov 2010 17:35:34 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-8920</guid>
		<description>Hi.
I am trying to work my ways trough magento and i can&#039;t find a way to create a block the &quot;right&quot; way.
 Can you point me to the doc or a tutorial of how to create a block with just the necessary files?</description>
		<content:encoded><![CDATA[<p>Hi.<br />
I am trying to work my ways trough magento and i can&#8217;t find a way to create a block the &#8220;right&#8221; way.<br />
 Can you point me to the doc or a tutorial of how to create a block with just the necessary files?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: narzedzia pneumatyczne</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-8416</link>
		<dc:creator>narzedzia pneumatyczne</dc:creator>
		<pubDate>Sun, 26 Sep 2010 19:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-8416</guid>
		<description>And my question is how can I access layout object from inside some block. I want to get current page title (if its set already).</description>
		<content:encoded><![CDATA[<p>And my question is how can I access layout object from inside some block. I want to get current page title (if its set already).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vier</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-7690</link>
		<dc:creator>Vier</dc:creator>
		<pubDate>Tue, 20 Jul 2010 17:50:11 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-7690</guid>
		<description>Hi, I&#039;m using this piece of code to create a simple contact form, but it appears with a default 3 columns layout and I&#039;d like to know how can I set it to appear with just 1 column.</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m using this piece of code to create a simple contact form, but it appears with a default 3 columns layout and I&#8217;d like to know how can I set it to appear with just 1 column.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daisy</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-6594</link>
		<dc:creator>Daisy</dc:creator>
		<pubDate>Tue, 30 Mar 2010 04:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-6594</guid>
		<description>Hi,

I want to add newsletter block into my one column products page. How to add newsletter block in desired location of the page.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to add newsletter block into my one column products page. How to add newsletter block in desired location of the page.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tejas</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-6484</link>
		<dc:creator>Tejas</dc:creator>
		<pubDate>Tue, 16 Mar 2010 10:01:53 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-6484</guid>
		<description>Hi,

Your post is very helpful :)

Thanks,</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Your post is very helpful <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Margots</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-6354</link>
		<dc:creator>Margots</dc:creator>
		<pubDate>Wed, 03 Mar 2010 19:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-6354</guid>
		<description>Can you create block in the xml layout file. For example, I want to use X block

X block name



X - new block that needs to be created, but how to do it in layout xml file?
Simply putting following will not work</description>
		<content:encoded><![CDATA[<p>Can you create block in the xml layout file. For example, I want to use X block</p>
<p>X block name</p>
<p>X &#8211; new block that needs to be created, but how to do it in layout xml file?<br />
Simply putting following will not work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mzouhel</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-6188</link>
		<dc:creator>mzouhel</dc:creator>
		<pubDate>Fri, 12 Feb 2010 15:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-6188</guid>
		<description>Can i add a custom template to my backend ?
i want print my orders in html format and i need to create a block under adminhtml :(</description>
		<content:encoded><![CDATA[<p>Can i add a custom template to my backend ?<br />
i want print my orders in html format and i need to create a block under adminhtml <img src='http://inchoo.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pneumatyka</title>
		<link>http://inchoo.net/ecommerce/magento/programatically-create-magento-blocks-and-inject-them-into-layout/comment-page-1/#comment-5854</link>
		<dc:creator>pneumatyka</dc:creator>
		<pubDate>Wed, 13 Jan 2010 08:02:46 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2292#comment-5854</guid>
		<description>Wonderfull, just what I was looking for simplest module possible. Thx!</description>
		<content:encoded><![CDATA[<p>Wonderfull, just what I was looking for simplest module possible. Thx!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

