<?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: Themeable View Class for CakePHP</title>
	<atom:link href="http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/</link>
	<description>Because you can never have too many blogs on the Internet...</description>
	<lastBuildDate>Thu, 05 Nov 2009 19:27:52 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Template par défaut pour CakePHP pour votre site en CakePHP &#171; Wareteam</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-7175</link>
		<dc:creator>Template par défaut pour CakePHP pour votre site en CakePHP &#171; Wareteam</dc:creator>
		<pubDate>Mon, 03 Nov 2008 16:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-7175</guid>
		<description>&lt;p&gt;[...] CakePHP themes made easy Theming your CakePHP apps (V1.2) Layout your cake with jOOmla templates Themeable View Class for CakePHP Merci d&#039;avance pour vos commentaires et vos contributions   Partager et découvrir : Ces icônes [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] CakePHP themes made easy Theming your CakePHP apps (V1.2) Layout your cake with jOOmla templates Themeable View Class for CakePHP Merci d&#8217;avance pour vos commentaires et vos contributions   Partager et découvrir : Ces icônes [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Bernd</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-4680</link>
		<dc:creator>Bernd</dc:creator>
		<pubDate>Sun, 06 Jan 2008 09:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-4680</guid>
		<description>&lt;p&gt;To make ThemeableView work with Cake version 1.2.0.6311-beta, you need to change method _getViewFileName(), because the calling param in the original View class has changed from $action to $name. Add the following lines and it will work again:&lt;/p&gt;

&lt;p&gt;function _getViewFileName( $name = null )
{
   $action = $this-&gt;action;
  ...&lt;/p&gt;

&lt;p&gt;This is just a quick fix. One may modify the method to process param $name when determining the template filename.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>To make ThemeableView work with Cake version 1.2.0.6311-beta, you need to change method _getViewFileName(), because the calling param in the original View class has changed from $action to $name. Add the following lines and it will work again:</p>

<p>function _getViewFileName( $name = null )
{
   $action = $this-&gt;action;
  &#8230;</p>

<p>This is just a quick fix. One may modify the method to process param $name when determining the template filename.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: nimrod.abing</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-4657</link>
		<dc:creator>nimrod.abing</dc:creator>
		<pubDate>Fri, 21 Dec 2007 23:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-4657</guid>
		<description>&lt;blockquote&gt;
  &lt;p&gt;Would be alot easier if there was some installation instructions, other than in the middle of the changelog. Like place it at the top of the readmefile or something.&lt;/p&gt;
  
  &lt;p&gt;I spent alot of time figuring out where to place themable.php&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What are you talking about? The instructions are right in the middle of the blog entry. Right about here:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;To use this class, place the file named themeable.php inside app/views.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I can&#039;t see how you could have missed that, unless you&#039;re one of those people who throw out the instruction manual and just try to &quot;wing it&quot;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>
  <p>Would be alot easier if there was some installation instructions, other than in the middle of the changelog. Like place it at the top of the readmefile or something.</p>
  
  <p>I spent alot of time figuring out where to place themable.php</p>
</blockquote>

<p>What are you talking about? The instructions are right in the middle of the blog entry. Right about here:</p>

<blockquote>
  <p>To use this class, place the file named themeable.php inside app/views.</p>
</blockquote>

<p>I can&#8217;t see how you could have missed that, unless you&#8217;re one of those people who throw out the instruction manual and just try to &#8220;wing it&#8221;.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Nextri</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-4654</link>
		<dc:creator>Nextri</dc:creator>
		<pubDate>Fri, 21 Dec 2007 16:12:55 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-4654</guid>
		<description>&lt;p&gt;Would be alot easier if there was some installation instructions, other than in the middle of the changelog. Like place it at the top of the readmefile or something.&lt;/p&gt;

&lt;p&gt;I spent alot of time figuring out where to place themable.php&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Would be alot easier if there was some installation instructions, other than in the middle of the changelog. Like place it at the top of the readmefile or something.</p>

<p>I spent alot of time figuring out where to place themable.php</p>]]></content:encoded>
	</item>
	<item>
		<title>By: nimrod.abing</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-3860</link>
		<dc:creator>nimrod.abing</dc:creator>
		<pubDate>Fri, 05 Oct 2007 11:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-3860</guid>
		<description>&lt;blockquote&gt;
  &lt;p&gt;I was wondering if this is correct, as the docs said they should all be under ‘app/themes/MyTheme’&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you deviate from documented behavior then that would be &quot;incorrect&quot;. The main reason for frameworks like CakePHP or Ruby on Rails is not only to provide you with a set of classes and functions to use in your app. It also provides you with a set of &quot;rules&quot; that you must adhere to if you expect your app to work. Apart from breakage, there is nothing stopping you from &quot;doing it your way&quot;. But I really suggest that you stick with documented behavior and conventions and resort to deviating from them as a last resort (e.g. to work around limitations of your server/hosting setup).&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;It doesn’t seem to work. I had a look at the themeable file and at _getViewFileName on line 327, I noticed that there is a foreach which goes through all the $paths-&gt;viewPaths as $path.
The $path unfortunately is ‘home/app/views/’ which means I would have to put all my view files under:
‘app/views/themes/MyTheme/’&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;I&#039;m not really sure why you&#039;re getting the wrong path. It must have something to do with your configuration. I haven&#039;t really touched CakePHP in a very long time (see &lt;a href=&quot;http://abing.gotdns.com/posts/2007/i-am-no-longer-tracking-cakephp-and-new-projects/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;). But if I recall correctly, $paths-&gt;viewPaths is generated by the framework from your configuration settings.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>
  <p>I was wondering if this is correct, as the docs said they should all be under ‘app/themes/MyTheme’</p>
</blockquote>

<p>If you deviate from documented behavior then that would be &#8220;incorrect&#8221;. The main reason for frameworks like CakePHP or Ruby on Rails is not only to provide you with a set of classes and functions to use in your app. It also provides you with a set of &#8220;rules&#8221; that you must adhere to if you expect your app to work. Apart from breakage, there is nothing stopping you from &#8220;doing it your way&#8221;. But I really suggest that you stick with documented behavior and conventions and resort to deviating from them as a last resort (e.g. to work around limitations of your server/hosting setup).</p>

<blockquote>

<p>It doesn’t seem to work. I had a look at the themeable file and at _getViewFileName on line 327, I noticed that there is a foreach which goes through all the $paths-&gt;viewPaths as $path.
The $path unfortunately is ‘home/app/views/’ which means I would have to put all my view files under:
‘app/views/themes/MyTheme/’</p>

</blockquote>

<p>I&#8217;m not really sure why you&#8217;re getting the wrong path. It must have something to do with your configuration. I haven&#8217;t really touched CakePHP in a very long time (see <a href="http://abing.gotdns.com/posts/2007/i-am-no-longer-tracking-cakephp-and-new-projects/" rel="nofollow">here</a>). But if I recall correctly, $paths-&gt;viewPaths is generated by the framework from your configuration settings.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-3859</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Fri, 05 Oct 2007 06:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-3859</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I love what you have done.&lt;/p&gt;

&lt;p&gt;I have a question, when I try to overload the view files it doesn&#039;t seem to work.&lt;/p&gt;

&lt;p&gt;Eg, I have: 
app/views/users/add.thtml&lt;/p&gt;

&lt;p&gt;I put it under
app/themes/MyTheme/views/users/add.thtml&lt;/p&gt;

&lt;p&gt;It doesn&#039;t seem to work. I had a look at the themeable file and at _getViewFileName on line 327, I noticed that there is a foreach which goes through all the $paths-&gt;viewPaths as $path.
The $path unfortunately is &#039;home/app/views/&#039; which means I would have to put all my view files under:
&#039;app/views/themes/MyTheme/&#039;&lt;/p&gt;

&lt;p&gt;If the foreach loop is deleted, it works as it should, I&#039;m not sure how $paths-&gt;viewPaths plays in cake so I didn&#039;t want to mess with it too much.&lt;/p&gt;

&lt;p&gt;I was wondering if this is correct, as the docs said they should all be under &#039;app/themes/MyTheme&#039;&lt;/p&gt;

&lt;p&gt;The layout file however works fabulously.&lt;/p&gt;

&lt;p&gt;I am using cake 1.1.10&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>

<p>I love what you have done.</p>

<p>I have a question, when I try to overload the view files it doesn&#8217;t seem to work.</p>

<p>Eg, I have: 
app/views/users/add.thtml</p>

<p>I put it under
app/themes/MyTheme/views/users/add.thtml</p>

<p>It doesn&#8217;t seem to work. I had a look at the themeable file and at _getViewFileName on line 327, I noticed that there is a foreach which goes through all the $paths-&gt;viewPaths as $path.
The $path unfortunately is &#8216;home/app/views/&#8217; which means I would have to put all my view files under:
&#8216;app/views/themes/MyTheme/&#8217;</p>

<p>If the foreach loop is deleted, it works as it should, I&#8217;m not sure how $paths-&gt;viewPaths plays in cake so I didn&#8217;t want to mess with it too much.</p>

<p>I was wondering if this is correct, as the docs said they should all be under &#8216;app/themes/MyTheme&#8217;</p>

<p>The layout file however works fabulously.</p>

<p>I am using cake 1.1.10</p>]]></content:encoded>
	</item>
	<item>
		<title>By: PJ Hile</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-3121</link>
		<dc:creator>PJ Hile</dc:creator>
		<pubDate>Mon, 11 Jun 2007 20:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-3121</guid>
		<description>&lt;p&gt;@Max&lt;/p&gt;

&lt;p&gt;I had the same problem because my view files were still using the *.thtml format.  Try changing them to *.ctp&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Max</p>

<p>I had the same problem because my view files were still using the *.thtml format.  Try changing them to *.ctp</p>]]></content:encoded>
	</item>
	<item>
		<title>By: nimrod.abing</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-2326</link>
		<dc:creator>nimrod.abing</dc:creator>
		<pubDate>Wed, 23 May 2007 01:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-2326</guid>
		<description>&lt;p&gt;@Andy&lt;/p&gt;

&lt;p&gt;I am not sure what you mean by &quot;multiple controllers&quot; and why you would want that but you can have a different theme for each action in your controller.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Andy</p>

<p>I am not sure what you mean by &#8220;multiple controllers&#8221; and why you would want that but you can have a different theme for each action in your controller.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-2325</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 22 May 2007 18:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-2325</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This is a great thing!
I was just wondering though...
In the past, for a simple CMS (and later blog,) project, I made a theme system that still allowed me to change what information was going to a view.&lt;/p&gt;

&lt;p&gt;For example, this type of system in your article only looks like it can change the css/js/views.  But is there a way in CakePHP to have multiple controllers (for example, one per one theme, etc.)?&lt;/p&gt;

&lt;p&gt;I&#039;m not sure if you check this anymore, but I wanted to ask because I&#039;m in process of moving my old project to CakePHP and am very interested in knowing.&lt;/p&gt;

&lt;p&gt;Andy&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>

<p>This is a great thing!
I was just wondering though&#8230;
In the past, for a simple CMS (and later blog,) project, I made a theme system that still allowed me to change what information was going to a view.</p>

<p>For example, this type of system in your article only looks like it can change the css/js/views.  But is there a way in CakePHP to have multiple controllers (for example, one per one theme, etc.)?</p>

<p>I&#8217;m not sure if you check this anymore, but I wanted to ask because I&#8217;m in process of moving my old project to CakePHP and am very interested in knowing.</p>

<p>Andy</p>]]></content:encoded>
	</item>
	<item>
		<title>By: nimrod.abing</title>
		<link>http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/comment-page-1/#comment-1231</link>
		<dc:creator>nimrod.abing</dc:creator>
		<pubDate>Wed, 31 Jan 2007 02:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://abing.gotdns.com/2006/09/11/54/#comment-1231</guid>
		<description>&lt;p&gt;@Max&lt;/p&gt;

&lt;p&gt;Did you specify the THEMES constant to point to the absolute path that contains your theme folders?&lt;/p&gt;

&lt;p&gt;For example, your theme is in: &lt;code&gt;/myhome/website/app/themes/MyTheme&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;THEMES should be set to &lt;code&gt;/myhome/website/app/themes/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Note that you have to include the trailing directory separator when you specify THEMES.&lt;/p&gt;

&lt;p&gt;I suggest you try it with the defaults first, they are confirmed to work out of the box with a default CakePHP setup. Place your theme inside a &lt;code&gt;themes&lt;/code&gt; folder in your CakePHP &lt;code&gt;app&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;Theme resources should be placed in a &lt;code&gt;themes&lt;/code&gt; folder inside your webroot.&lt;/p&gt;

&lt;p&gt;You should also note that on Unix systems, filenames are case sensitive. If you named your themes folder &lt;code&gt;MyThemes&lt;/code&gt; your &lt;code&gt;$themeName&lt;/code&gt; should also be set to &lt;code&gt;&#039;MyThemes&#039;&lt;/code&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Max</p>

<p>Did you specify the THEMES constant to point to the absolute path that contains your theme folders?</p>

<p>For example, your theme is in: <code>/myhome/website/app/themes/MyTheme</code></p>

<p>THEMES should be set to <code>/myhome/website/app/themes/</code>.</p>

<p>Note that you have to include the trailing directory separator when you specify THEMES.</p>

<p>I suggest you try it with the defaults first, they are confirmed to work out of the box with a default CakePHP setup. Place your theme inside a <code>themes</code> folder in your CakePHP <code>app</code> folder.</p>

<p>Theme resources should be placed in a <code>themes</code> folder inside your webroot.</p>

<p>You should also note that on Unix systems, filenames are case sensitive. If you named your themes folder <code>MyThemes</code> your <code>$themeName</code> should also be set to <code>'MyThemes'</code></p>]]></content:encoded>
	</item>
</channel>
</rss>
