Sunday, March 20, 2011

CakePHP and Themed Assets

Just a quick note that might save some of you a lot of time, if you're working with CakePHP and trying to set up themes with theme-specific css, the CakePHP documentation will tell you to place your assets under /app/webroot/themed/example/css/ (as documented here). This makes sense, given that themed views would be under /app/webroot/themed/example/.

After some quick perusal of the cake source code, I discovered that assets should in fact be placed under /app/webroot/theme/example/css/ (theme, not themed, no 'd' - take it away).

Not the first time a single character has broken more than it's fair share of code (this coder girl may or may not have taken down an entire site by failing to declare a '.' as a literal character and not a wildcard in a regular expression), but it's the last time THAT particular character will break your themed assets.