Closed (fixed)
Project:
Zen
Version:
7.x-5.x-dev
Component:
PHP/JS code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2012 at 18:09 UTC
Updated:
13 Aug 2013 at 12:01 UTC
I'm making a subtheme node--type.tpl.php and and using $theme_path- which is returning the incorrect path of sites/all/themes/zen.
When looking over the $theme_path code in modules/php/php.module it looks like drupal is using a simple drupal_get_path function..
Some notes:
$theme returns my subtheme correctly
zen is not enabled, but this behavior is persistant when it is.
I did clear caches, even used registry_rebuild.
This tpl file is inside sites/default/subtheme/templates/
So I'm reporting this... wondering if this is a bug?
Comments
Comment #1
johnalbinYes, that is definitely a bug. Unfortunately, it is unfixable in D7.
The theme() function temporarily changes $theme_path to the theme that controls the template file. So inside each template file, the $theme_path means "path to this template file". Everywhere else, the $theme_path is the path to the active theme. :-p