<?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>Ptocheia.net &#187; cakephp</title>
	<atom:link href="http://ptocheia.net/tag/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://ptocheia.net</link>
	<description>Android Hell is a Real Place</description>
	<lastBuildDate>Sun, 20 May 2012 16:59:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CakePHP Form Validation: Making Your Error Messages Change Color</title>
		<link>http://ptocheia.net/2009/09/03/cakephp-formvalidation-making-your-error-messages-change-color/</link>
		<comments>http://ptocheia.net/2009/09/03/cakephp-formvalidation-making-your-error-messages-change-color/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 22:47:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://ptocheia.net/?p=237</guid>
		<description><![CDATA[<p>When you build a form with Cake and have any sort of validation, it would be nice to have a means for the displayed error message to <a href="http://ptocheia.net/2009/09/03/cakephp-formvalidation-making-your-error-messages-change-color/"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<p>When you build a form with Cake and have any sort of validation, it would be nice to have a means for the displayed error message to distinguish itself from the rest of the text (in my particular case, making the text red). Unfortunately, Cake doesn&#8217;t seem to have anything built in to easily do this. After playing around with my Cake site for a bit, and doing some extensive Google searching for a simple solution (and coming up lacking), I realized something basic that would do the trick: setting the font color style for  &lt;form&gt; (or any enclosing element around &lt;form&gt;) to be the color of my error message, and setting the color for the elements within the form to be the regular text color.</p>
<p>This is working well enough for me for the css:</p>
<p><code><br />
	form{<br />
		color: #ff0000;<br />
	}<br />
	label{<br />
		color: #000;<br />
	}<br />
</code></p>
<p>This only works for displaying error messages though (or rather, for displaying a single message color). If you need a second color, you can probably set a session in your controller to represent a css style, which your view can use to determine which style should get used.  But then again, probably the only reason you&#8217;d want another color is for success messages, and those are mostly useful if you&#8217;re using Ajax, in which case you&#8217;ve got better means of message styling then the one I&#8217;ve posted here anyhow. </p>
]]></content:encoded>
			<wfw:commentRss>http://ptocheia.net/2009/09/03/cakephp-formvalidation-making-your-error-messages-change-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting rid of that extra /pages/ in your URL for static pages using CakePHP</title>
		<link>http://ptocheia.net/2009/08/28/getting-rid-of-that-extra-pages-in-your-url-for-static-pages-using-cakephp/</link>
		<comments>http://ptocheia.net/2009/08/28/getting-rid-of-that-extra-pages-in-your-url-for-static-pages-using-cakephp/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 20:15:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[routes]]></category>

		<guid isPermaLink="false">http://ptocheia.net/?p=225</guid>
		<description><![CDATA[<p>So I&#8217;m just learning CakePHP, and I&#8217;m doing so by translating a site from html into Cake. Most of the pages are static pages, so I&#8217;m putting <a href="http://ptocheia.net/2009/08/28/getting-rid-of-that-extra-pages-in-your-url-for-static-pages-using-cakephp/"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m just learning CakePHP, and I&#8217;m doing so by translating a site from html into Cake. Most of the pages are static pages, so I&#8217;m putting them into app/views/pages. Thing is, when I look at them in the browser, the name of the page is always preceded by that blasted pages/, and I wanted to get rid of that. I.e. I wanted www.mysite.com/pages/about to be www.mysite.com/about. I finally found how to do this, and figured I&#8217;d post it here for future reference purposes:</p>
<p>Locate routes.php, found in app/config/, and add this line:</p>
<p><code>Router::connect('*', array('controller' =&gt; 'pages', 'action' =&gt; 'display'));</code></p>
<p>That should eliminate the pages/ in the url for any of your .ctp files located in the pages directory.</p>
<p>Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://ptocheia.net/2009/08/28/getting-rid-of-that-extra-pages-in-your-url-for-static-pages-using-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

