In an attempt to keep my scripts maintainable, I\'m going to move each into their own file, organised by controller and action:
// scripts which only apply t
Very easy to do in your default.ctp
layout file:
An example to automatically include .css
files per controller and/or controller/action (because I had this lying around, easily adaptable to .js
files):
...
params['controller'] . '.css')) {
echo $html->css($this->params['controller']);
}
if (is_file(WWW_ROOT . 'css' . DS . $this->params['controller'] . DS . $this->params['action'] . '.css')) {
echo $html->css($this->params['controller'] . '/' . $this->params['action']);
}
?>
...