<?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"
	>
<channel>
	<title>Comments on: Simple Zend_Layout Example</title>
	<atom:link href="http://akrabat.com/2007/12/11/simple-zend_layout-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/</link>
	<description>Developing PHP and XUL Software in the Real World</description>
	<pubDate>Sun, 20 Jul 2008 14:15:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: beto</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21481</link>
		<dc:creator>beto</dc:creator>
		<pubDate>Tue, 13 May 2008 11:54:21 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21481</guid>
		<description>I followed all the article. excelent. but it wasnt working until I take de baseurl.php and put it in the folder with your code.</description>
		<content:encoded><![CDATA[<p>I followed all the article. excelent. but it wasnt working until I take de baseurl.php and put it in the folder with your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: beto</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21480</link>
		<dc:creator>beto</dc:creator>
		<pubDate>Tue, 13 May 2008 11:53:31 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21480</guid>
		<description>You forgot to explain the file baseurl.php!</description>
		<content:encoded><![CDATA[<p>You forgot to explain the file baseurl.php!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21424</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 08 May 2008 09:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21424</guid>
		<description>Rob,

I wonder if you can explain the following. I have used the actionStack as in your book to call a menuAction for generating website navigation.

As the navigation depends on the current page (e.g. showing child pages), I wanted to pass the original request to the menuAction. By setting the controller/action names as params in the cloned request, this is easily achievable. I thought it might be neater to pass the original request though, maintaining all the parameters and original information.

The code looks something like this:

public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
{
    $front = Zend_Controller_Front::getInstance();
    
    if (!$front-&#62;hasPlugin('Zend_Controller_Plugin_ActionStack')) {
    
        $actionStack = new Zend_Controller_Plugin_ActionStack();
        $front-&#62;registerPlugin($actionStack, 97);
        
    } else {
        $actionStack = $front-&#62;getPlugin('Zend_Controller_Plugin_ActionStack');
    } 
    
    $menuAction = clone($request); 
    
	//pass original request as param
	$menuAction-&#62;setActionName('index')		
               -&#62;setControllerName('navigation')
               -&#62;setParam('original', $request);
               
    $actionStack-&#62;pushStack($menuAction);
    
}

//.... navigationController

public function indexAction(){
    
    //get controller name - returns 'navigation' instead of original
    $this-&#62;getRequest()-&#62;getParam('original')-&#62;getControllerName();
    
    //can access original request info like this however
    $this-&#62;getRequest()-&#62;getParam('controller');

}

Do you know why I can't pass the original request as a parameter, and call its methods?</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>I wonder if you can explain the following. I have used the actionStack as in your book to call a menuAction for generating website navigation.</p>
<p>As the navigation depends on the current page (e.g. showing child pages), I wanted to pass the original request to the menuAction. By setting the controller/action names as params in the cloned request, this is easily achievable. I thought it might be neater to pass the original request though, maintaining all the parameters and original information.</p>
<p>The code looks something like this:</p>
<p>public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)<br />
{<br />
    $front = Zend_Controller_Front::getInstance();</p>
<p>    if (!$front-&gt;hasPlugin('Zend_Controller_Plugin_ActionStack')) {</p>
<p>        $actionStack = new Zend_Controller_Plugin_ActionStack();<br />
        $front-&gt;registerPlugin($actionStack, 97);</p>
<p>    } else {<br />
        $actionStack = $front-&gt;getPlugin('Zend_Controller_Plugin_ActionStack');<br />
    } </p>
<p>    $menuAction = clone($request); </p>
<p>	//pass original request as param<br />
	$menuAction-&gt;setActionName('index')<br />
               -&gt;setControllerName('navigation')<br />
               -&gt;setParam('original', $request);</p>
<p>    $actionStack-&gt;pushStack($menuAction);</p>
<p>}</p>
<p>//&#8230;. navigationController</p>
<p>public function indexAction(){</p>
<p>    //get controller name - returns 'navigation' instead of original<br />
    $this-&gt;getRequest()-&gt;getParam('original')-&gt;getControllerName();</p>
<p>    //can access original request info like this however<br />
    $this-&gt;getRequest()-&gt;getParam('controller');</p>
<p>}</p>
<p>Do you know why I can't pass the original request as a parameter, and call its methods?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21410</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 07 May 2008 16:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21410</guid>
		<description>Kevin,

Probably best to set a param and test for its existence in you MenuController.</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Probably best to set a param and test for its existence in you MenuController.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21398</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Tue, 06 May 2008 21:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21398</guid>
		<description>Rob,

If we setup a menucontroller and a menuaction, how do we block users from going to domain.com/menu/menu?

In my case, I end up seeing two menus stacked on top of each other. One from layout()-&#62;menu, and then again from layout-&#62;content (because the content becomes the menu...again!).

I tried _redirect and _forward, but it doesn't work...seems like I create an infinite loop.

My only other idea is to use Zend_Acl to block certain actions...haven't tried it yet though.

Thanks,

Kevin</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>If we setup a menucontroller and a menuaction, how do we block users from going to domain.com/menu/menu?</p>
<p>In my case, I end up seeing two menus stacked on top of each other. One from layout()-&gt;menu, and then again from layout-&gt;content (because the content becomes the menu&#8230;again!).</p>
<p>I tried _redirect and _forward, but it doesn't work&#8230;seems like I create an infinite loop.</p>
<p>My only other idea is to use Zend_Acl to block certain actions&#8230;haven't tried it yet though.</p>
<p>Thanks,</p>
<p>Kevin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21364</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 04 May 2008 20:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21364</guid>
		<description>Thanks for the heads up Rob. I'll give that a go later.</description>
		<content:encoded><![CDATA[<p>Thanks for the heads up Rob. I'll give that a go later.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21354</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Sat, 03 May 2008 21:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21354</guid>
		<description>LOL,

I wasn't pressurising you... honest!

However, as you find errors, let us know on the MEAP forums :)

A new MEAP version will be out soon too which will be manuscript complete!

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>LOL,</p>
<p>I wasn't pressurising you&#8230; honest!</p>
<p>However, as you find errors, let us know on the MEAP forums :)</p>
<p>A new MEAP version will be out soon too which will be manuscript complete!</p>
<p>Regards,</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21353</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sat, 03 May 2008 21:11:38 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21353</guid>
		<description>I just bought it! I'll let you know how it goes.</description>
		<content:encoded><![CDATA[<p>I just bought it! I'll let you know how it goes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21352</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Sat, 03 May 2008 20:52:23 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21352</guid>
		<description>Kevin,

That's the one :)

You can pre-order now (click the book image on www.zendframeworkinaction.com) and you'll be sent the pre-release PDF.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>That's the one :)</p>
<p>You can pre-order now (click the book image on <a href="http://www.zendframeworkinaction.com" rel="nofollow">http://www.zendframeworkinaction.com</a>) and you'll be sent the pre-release PDF.</p>
<p>Regards,</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21350</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sat, 03 May 2008 20:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/11/simple-zend_layout-example/#comment-21350</guid>
		<description>You mean Chapter 4 in your book that is not even published yet? Trust me, I will be first in line for your book. I just wish I had it in my hands right now. :)</description>
		<content:encoded><![CDATA[<p>You mean Chapter 4 in your book that is not even published yet? Trust me, I will be first in line for your book. I just wish I had it in my hands right now. :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
