<?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: Where to set up your view?</title>
	<atom:link href="http://akrabat.com/2007/12/09/where-to-set-up-your-view/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/</link>
	<description>Developing PHP and XUL Software in the Real World</description>
	<pubDate>Thu, 28 Aug 2008 14:01:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Daniel</title>
		<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-19896</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 10 Feb 2008 11:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-19896</guid>
		<description>I had problems using $request-&#62;getBaseUrl() when linking to CSS or image files.
Instead I found it to be safer to use $request-&#62;getBasePath() to make sure a trailing 'index.php' get's dropped in all circumstances.

When using getBaseUrl() I sometimes ended up with '/foo/index.php/main.css'. This would happen if the index.php would be called directly.

When using getBasePath() I would always get '/foo/'.</description>
		<content:encoded><![CDATA[<p>I had problems using $request-&gt;getBaseUrl() when linking to CSS or image files.<br />
Instead I found it to be safer to use $request-&gt;getBasePath() to make sure a trailing 'index.php' get's dropped in all circumstances.</p>
<p>When using getBaseUrl() I sometimes ended up with '/foo/index.php/main.css'. This would happen if the index.php would be called directly.</p>
<p>When using getBasePath() I would always get '/foo/'.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-19586</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Sun, 20 Jan 2008 21:04:38 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-19586</guid>
		<description>Amr,

To be honest,  I don't think it really matters if you use a plugin or a parent controller class.

The best thing about action helpers is that you can limit the helper to doing one thing only, whereas if you have a parent, then it will end up doing lots of little things.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Amr,</p>
<p>To be honest,  I don't think it really matters if you use a plugin or a parent controller class.</p>
<p>The best thing about action helpers is that you can limit the helper to doing one thing only, whereas if you have a parent, then it will end up doing lots of little things.</p>
<p>Regards,</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amr Mostafa</title>
		<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-19585</link>
		<dc:creator>Amr Mostafa</dc:creator>
		<pubDate>Sun, 20 Jan 2008 15:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-19585</guid>
		<description>Many thanks for sharing your plan, this kind of tips and information are very much needed to clear some of the newbies confusion out there (pointing to self).

The way I was doing it is by creating an extended Zend_Controller_Action calling it e.g. BaseController, then all Action Controllers would inherit from it. This way I can do any initialization I'd like in BaseController's init().

I'm not sure which approach would be better. But Plugin is certainly more re-usable. Any other pros / cons?</description>
		<content:encoded><![CDATA[<p>Many thanks for sharing your plan, this kind of tips and information are very much needed to clear some of the newbies confusion out there (pointing to self).</p>
<p>The way I was doing it is by creating an extended Zend_Controller_Action calling it e.g. BaseController, then all Action Controllers would inherit from it. This way I can do any initialization I'd like in BaseController's init().</p>
<p>I'm not sure which approach would be better. But Plugin is certainly more re-usable. Any other pros / cons?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18905</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Tue, 11 Dec 2007 22:08:35 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18905</guid>
		<description>Guess I need to refactor my method...

I setup the view for the most part during boot strap... the menu's are added to the layout using a controller plugin, and the minor stuff like links I use a helper for... something along the lines of link('module/controller/action') ?&#62;</description>
		<content:encoded><![CDATA[<p>Guess I need to refactor my method&#8230;</p>
<p>I setup the view for the most part during boot strap&#8230; the menu's are added to the layout using a controller plugin, and the minor stuff like links I use a helper for&#8230; something along the lines of link('module/controller/action') ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18831</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Mon, 10 Dec 2007 14:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18831</guid>
		<description>Kaloyan,

It's nothing clever :)  We just put all the js, img and css files into a 'theme' subfolder with www/. At the moment we have two: 'default' for the front end and 'admin' for the administration system.

It's mainly intended as an organisational thing so we don't get confused as to which CSS files go with which background images.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Kaloyan,</p>
<p>It's nothing clever :)  We just put all the js, img and css files into a 'theme' subfolder with www/. At the moment we have two: 'default' for the front end and 'admin' for the administration system.</p>
<p>It's mainly intended as an organisational thing so we don't get confused as to which CSS files go with which background images.</p>
<p>Regards,</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18822</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Mon, 10 Dec 2007 12:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18822</guid>
		<description>I've personally been setting most of my view in the bootstrap. Now I think I'm going to switch to your plugin method, it looks much nicer. The view helper method seems like it would take a lot of extra work for each variable. (and possibly a lot of overhead too)

 Erik</description>
		<content:encoded><![CDATA[<p>I've personally been setting most of my view in the bootstrap. Now I think I'm going to switch to your plugin method, it looks much nicer. The view helper method seems like it would take a lot of extra work for each variable. (and possibly a lot of overhead too)</p>
<p> Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaloyan K. Tsvetkov</title>
		<link>http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18818</link>
		<dc:creator>Kaloyan K. Tsvetkov</dc:creator>
		<pubDate>Mon, 10 Dec 2007 10:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/12/09/where-to-set-up-your-view/#comment-18818</guid>
		<description>&lt;pre class="phpcode"&gt;&lt;span style="color: #0000BB"&gt;$viewRenderer&lt;/span&gt;&lt;span style="color: #007700"&gt;-&#62;&lt;/span&gt;&lt;span style="color: #0000BB"&gt;view&lt;/span&gt;&lt;span style="color: #007700"&gt;-&#62;&lt;/span&gt;&lt;span style="color: #0000BB"&gt;theme&#160;&lt;/span&gt;&lt;span style="color: #007700"&gt;=&#160;&lt;/span&gt;&lt;span style="color: #0000BB"&gt;$request&lt;/span&gt;&lt;span style="color: #007700"&gt;-&#62;&lt;/span&gt;&lt;span style="color: #0000BB"&gt;getParam&lt;/span&gt;&lt;span style="color: #007700"&gt;(&lt;/span&gt;&lt;span style="color: #DD0000"&gt;'theme'&lt;/span&gt;&lt;span style="color: #007700"&gt;,&#160;&lt;/span&gt;&lt;span style="color: #DD0000"&gt;'default'&lt;/span&gt;&lt;span style="color: #007700"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

Hi, can you explain how this "theme" thing works ? Thanks</description>
		<content:encoded><![CDATA[<pre class="phpcode"><span style="color: #0000BB">$viewRenderer</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">view</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">theme&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$request</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getParam</span><span style="color: #007700">(</span><span style="color: #DD0000">'theme'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'default'</span><span style="color: #007700">);</span>
</pre>
<p>Hi, can you explain how this "theme" thing works ? Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
