Current implementation of alpha's alpha_get_theme() get's invoked prior to the inclusion of a sub-theme's /template.php.
This means that if a user wanted to override
class alpha_theme_container { // ...
}
they would be unable to do so by simply including the class definition in their template.php, which is counter-intuitive, as alpha's own template.php simply does:
require_once dirname(__FILE__) . '/includes/base.inc';
Worse, because of caching, alpha never rechecks later once the subtheme(s)' template.php's have been loaded.
I plan to add a minor tweak to the function, making sure that the subtheme template.php's are incorporated prior to the test for class_exists.
Essentially i want to roll a patch that includes this code:
$template_php = DRUPAL_ROOT . '/' . drupal_get_path('theme', $item) . "/template.php";
if (file_exists($template_php)) {
include_once $template_php;
}
I hope to roll the patch this weekend :)
Comment | File | Size | Author |
---|---|---|---|
#1 | include_subtheme_templates-1653120-1.patch | 794 bytes | jefkin |
Comments
Comment #1
jefkin CreditAttribution: jefkin commentedLet's see if this works.
Comment #1.0
jefkin CreditAttribution: jefkin commentedforgot the '/' to separate the DRUPAL_ROOT from the drupal_get_path() path.