Did you that it only takes a minute to start using themes for your CakePHP application? No? It's just these steps you need to start using themes:
1. In your (app)controller: var $view = 'Theme';
2. In your (app)controller: var $theme = 'orange';
3. Or from a function: $this->theme = 'orange';
That's it! You can now create custom views and layouts for this theme under /app/views/themed/orange. Below that folder you should use the same structure as under /app/views. For example, create a file /app/views/themed/orange/layouts/default.ctp.
So, if theme-specific files exist in themed folders, these will be used, else, CakePHP switched back to the default layouts and views.
You can also create custom CSS and JS files under /app/webroot/themed/orange/css and /app/webroot/themed/orange/js.
Pretty easy huh...
Did you already use themes?
Posts tonen met het label themes. Alle posts tonen
Posts tonen met het label themes. Alle posts tonen
dinsdag 9 juni 2009
Abonneren op:
Posts (Atom)