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.

CommentFileSizeAuthor
zen_path_to_theme.patch1.51 KBjjeff

Comments

deciphered’s picture

Status: Needs review » Reviewed & tested by the community

Patch tested and should be RTBC.

mot’s picture

Hi 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.

deciphered’s picture

Page.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.

mot’s picture

Now I understand the problem. Patch looks good.

wuf31’s picture

just applied the patch, looking good.

johnalbin’s picture

Status: Reviewed & tested by the community » Fixed

Sorry, 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.