Hello all,
I have searched high and low on the Drupal Theming Guide for help with this, and I haven't been able to find an explicit answer - so I figured I would turn to the good people of the Drupal community for ideas.
Background:
I have one base theme that applies a very general layout to multiple sites. This theme has a page.tpl.php file and a template.php file that creates a few general variables I needed across all of my sites that will use this base theme.
I have multiple sub-themes that are based off of this base theme. The sub themes will inherit the page.tpl.php file from the base theme, and each of these sub-themes have site-specific CSS and such, but most everything is being pulled in from the base theme.
My Goal:
Alrighty, so here is what I am seemingly having problems doing. In my base theme's template.php file I create a handful of variables which I use in my base theme's page.tpl. However, on a couple (not all) of the subthemes, I want to edit said variables for the site-specifc themes. However, when I try to do that in the subtheme template.php file, the changes do not get applied to the inherited page.tpl.php file from the base theme.
I have tried multiple preprocess functions in the subtheme's template.php file, and multiple ways to implement the changes to the variables - but still nothing gets applied. I want to be able to edit these variables without having to create a new page.tpl.php file in my subthemes.
Any help, explanations, or ideas would be greatly appreciated.
Thanks,
Emily
Comments
Start by making sure your
Start by making sure your subtheme template.php file is being applied at all.
Try something like this just as a test:
Make sure your using your subtheme name in your function names and that you cleared your cache.
Clear the cache! *facepalm* I
Clear the cache! *facepalm*
I have cache disabled when I do theme development, so I don't even think about clearing it.
Wonderful little newbie mistake there. Ah well, thank you very much.
-Emily