<?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; controller</title>
	<atom:link href="http://blog.adin.pro/tag/controller/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 load template from controller</title>
		<link>http://blog.adin.pro/2015-02-11/magento-load-template-controller/</link>
		<comments>http://blog.adin.pro/2015-02-11/magento-load-template-controller/#comments</comments>
		<pubDate>Wed, 11 Feb 2015 09:49:05 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=451</guid>
		<description><![CDATA[<p>To load html content of a template inside a controller, for example for ajax response, you can do :</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-02-11/magento-load-template-controller/">Magento load template from controller</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>To load html content of a template inside a controller, for example for ajax response, you can do :</p>
<pre class="brush: php; title: ; notranslate">
$block = $this-&gt;getLayout()-&gt;createBlock('adin_admin/adminhtml_scheduletcrender')-&gt;setTemplate('admin/scheduletcrender.phtml');
$block-&gt;assign(array('ateliers' =&gt; $ateliers));
$html = $block-&gt;toHtml();
$response = array('html' =&gt; $html);
     
//send response as json
$this-&gt;getResponse()-&gt;setHeader('Content-type', 'application/json');
$this-&gt;getResponse()-&gt;setBody(Mage::helper('core')-&gt;jsonEncode($response));
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-02-11/magento-load-template-controller/">Magento load template from controller</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-02-11/magento-load-template-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
