Archive

Posts Tagged ‘themes’

Themes in CakePHP 2.0.0

May 23rd, 2011 5 comments

I’ve spent the best part of half a day trying to figure out why themes were not working for me in CakePHP 2.0.0

The closest I got to a solution can be found over on stackoverflow.com.

Difference is that you need to set $this->viewClass to ‘Theme’ instead of $this->view, but there are 2 more unmentioned issues with the sample code provided as a solution:

public function beforeRender() {
	if ($this->RequestHandler->isMobile()) {
		$this->viewClass = 'Theme';
		$this->theme = 'mobile';
	}
}

The first is that RequestHandler has been replaced by request.

So you may use:

if ($this->request->isMobile()) {

or

if ($this->request->is('mobile')) {

The other is that despite you’ve named your theme ‘mobile’, CakePHP’s new CamelCasing behaviours will turn this into ‘Mobile’. Because of this, you need your theme’s files to be located in ‘app/View/Themed/Mobile‘, and not in ‘app/View/Themed/mobile‘.

Categories: All, PHP, Web

iNove theme by NeoEase for WordPress 3.0

June 18th, 2010 9 comments

I wasn’t at all sure how well or badly this theme will behave with the newly released WordPress 3.0, but for anyone looking for information, you are looking at a WordPress 3.0 blog.

I haven’t found any issues myself, but if you happen to find anything which isn’t working as expected, please use the contact form to let me know about it.

Categories: All, Technology, Web