Closed (won't fix)
Project:
Zen
Version:
6.x-1.1
Component:
layout.css
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jan 2010 at 23:15 UTC
Updated:
18 Aug 2013 at 08:30 UTC
I'm overriding the front page template using page-front.tpl.php and the conditional-stylesheets I'm settings are not showing up in that template. They work correctly in page.tpl.php. I had to print $conditional_styles directly into page-front.tpl.php.
In mytheme.info:
; Set the conditional stylesheets that are processed by IE.
conditional-stylesheets[if lt IE 8][all][] = ie.css
conditional-stylesheets[if lt IE 7][all][] = fix-ie6.css
In page.tpl.php (using default and works):
<head>
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<?php print $scripts; ?>
</head>
In page-front.tpl.php (doesn't show conditional styles unless I print manually)
<head>
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<?php print $scripts; ?>
<?php if ($conditional_styles) { print $conditional_styles; } ?>
</head>
Comments
Comment #1
HTB commentedYup same thing here except it's not even zen, it worked for me at first and now... nothing. heres my .info
apparently the module is triggered when the theme registry is cleared, I've been to the theme section and also used the performance section but to no avail...
I have confirmed that the relevant markup isnt being generated by viewing the page source.
I think this one is a bug...
Comment #2
francewhoaSame here. It is not a bug though. This is by design. The following worked for me http://drupal.org/node/321845#comment-1062226
Comment #3
jlbretton commentedmmmh... I think is a bug. I don't see any too good logic doing it "by design".
If I look at my
<!--[if lte IE 7]><link type="text/css" rel="stylesheet" ...in the generated html pages I see:a. Drupal doesn't load new ie.css, even if you change the css filename. It keep the old one some where in cache/memory or...? Clearing caches + rebuilding template , with or without the "...have you tried copying Zen's page.tpl.php (unmodified) to your subtheme directory as well" doesn't affect Drupal in my case.
b. Looking at my the generated code line
<!--[if lte IE 7]><link type="text/css" rel="stylesheet" ..., I see a wrong path to the file. To make it work I had tomanually print
<?php print ('<!--[if IE 7]><link rel="stylesheet" ...into the page.tpl.php, with an absolute machine path to the root server!!! The based Drupal path for the current website is not read. Even a<?php if ($conditional_styles) { print $conditional_styles; } ?>in page.tpl.php is not printed.Jean
Some more feedback:
a. You need your base theme with the radio button "enabled" check off. "Default" won't be enough, even if your theme seems to work.
b. If you are enabling the theme back or reset to default your theme, it won't work back neither. The solution beeing to manually delete the conditional_stylesheets variable (with Devel or directly on your db) and then only, check off "enabled" the base theme. In this case the module will read and write back in the db the variable wich will make correctly work the module. If for some reason, you deasable the base theme again, you will have to redo all those manipulations.
Jean
Comment #4
johnalbinIt's a bug in core that can't be fixed in D6.