Apparently the $directory variable represents the path to the current template file, so if a subtheme does not have a page.tpl.php file, the $directory variable available to page.tpl.php represents the path to the original Zen theme. This means that if you place an ie.css file into your subtheme, it may not be recognized.
This patch adds a new variable $path_to_theme which is the path to the current (sub)theme separate from the $directory variable. Then this variable is used in page.tpl.php to determine if there is an ie.css file in the subtheme's directory.
| Comment | File | Size | Author |
|---|---|---|---|
| zen_path_to_theme.patch | 1.51 KB | jjeff |
Comments
Comment #1
decipheredPatch tested and should be RTBC.
Comment #2
mot commentedHi Deciphered, thanks for your input. Can you give some brief details when pagel.tpl.php is not used? I thought this is a central component that can not be skipped. Is subtheming related to popups or similar? The Info should make it possible to test your review and test your patch.
Comment #3
decipheredPage.tpl.php is used, however the issue is when the sub-theme doesn't have it's own copy of page.tpl.php, instead it uses the default zen/zen/page.tpl.php and $directory is zen/zen instead of the sub-theme directory.
Comment #4
mot commentedNow I understand the problem. Patch looks good.
Comment #5
wuf31 commentedjust applied the patch, looking good.
Comment #6
johnalbinSorry, I didn't comment on this sooner, but now that #245832: Add IE conditional stylesheets to .info file has been committed, the whole gawd-awful “
<?php if (file_exists($directory . '/ie.css')): ?>” cruft goes away completely.Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.