Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions views/helpers/asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,18 @@ function __findFile(&$asset, $type) {
$paths = array($this->__getPath($type));
$paths = array_merge($paths, $this->options['searchPaths']);

//checks if a theme is being used
if(!empty($this->theme))
{
//cakePHP < 1.2 suggests putting themes in /webroot/theme/themeName, while cakePHP > 1.3 suggests putting it in /views/themed/themeName
//so I'm covering both cases here
$themePaths = array( WWW_ROOT . 'theme' . DS . $this->theme . DS,
VIEWS . 'themed' . DS . $this->theme . DS,
);

$paths = array_merge($paths, $themePaths);
}


if (!empty($asset['plugin']) > 0) {
$pluginPaths = App::path('plugins');
Expand Down