<?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: Where to set up your view?</title>
	<atom:link href="http://akrabat.com/php/where-to-set-up-your-view/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/php/where-to-set-up-your-view/</link>
	<description>Developing PHP software in the Real World, by Rob Allen</description>
	<lastBuildDate>Thu, 11 Mar 2010 20:06:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daniel</title>
		<link>http://akrabat.com/php/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-&gt;getBaseUrl() when linking to CSS or image files.
Instead I found it to be safer to use $request-&gt;getBasePath() to make sure a trailing &#039;index.php&#039; get&#039;s dropped in all circumstances.

When using getBaseUrl() I sometimes ended up with &#039;/foo/index.php/main.css&#039;. This would happen if the index.php would be called directly.

When using getBasePath() I would always get &#039;/foo/&#039;.</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/php/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&#039;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...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amr Mostafa</title>
		<link>http://akrabat.com/php/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&#039;d like in BaseController&#039;s init().

I&#039;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/php/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&#039;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(&#039;module/controller/action&#039;) ?&gt;</description>
		<content:encoded><![CDATA[<p>Guess I need to refactor my method...</p>
<p>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') ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/php/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&#039;s nothing clever :)  We just put all the js, img and css files into a &#039;theme&#039; subfolder with www/. At the moment we have two: &#039;default&#039; for the front end and &#039;admin&#039; for the administration system.

It&#039;s mainly intended as an organisational thing so we don&#039;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...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://akrabat.com/php/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&#039;ve personally been setting most of my view in the bootstrap. Now I think I&#039;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/php/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=&quot;phpcode&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$viewRenderer&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;view&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;theme&#160;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$request&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;getParam&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;theme&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&#160;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

Hi, can you explain how this &quot;theme&quot; 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>
