hi

i have a big CSS/XHTML framework, where all styles are already configured in different css files. i'd like to use panels for subtemplates in this theme. it looks like working in general, but there is one bug inside panels. if i remove in the following function the "css" attribute, the panels module adds a wrong css path/file to the content.

function panels_twocol_50_50_panels_layouts() {
$items['twocol_50_50'] = array(
'module' => 'panels',
'title' => t('2 Column (50/50) '),
'icon' => 'layouts/twocol_50_50.png',
'theme' => 'panels_twocol_50_50',
'content areas' => array('left' => t('Left side'), 'right' => t('Right side')),
);

return $items;
}

As you can see i have removed the not reqired css attribute. this ends in the code with <style type="text/css" media="all">@import "/drupal/themes/mytheme/";</style> what is simply wrong.

how can i get rid of the bad CSS path added?

Regards
Marc

Comments

marc.bau’s picture

please, make CSS attribute "optional". Is this possible?

merlinofchaos’s picture

Category: bug » feature
Priority: Critical » Normal

At the moment the CSS field is simply required.

You can, however, copy the CSS file to your theme, retaining the layout directory (so something like themes/mytheme/layouts/twocol.css for example) and it'll use that *instead of* its own CSS.

No matter what you may think, this is in no way a critical bug, and I don't believe it's really a bug, since nowhere did I say that the 'css' setting was optional.

marc.bau’s picture

i added a dummy css file in the layout directory, with nothing in it. so i'm able to workaround now. But adding this dummy css makes no sense, so i will be happy if you are able to make this css optional. sometimes requirements are changing...

I removed all your layouts examples - not working in the css framework i'm implementing (floats do not work in IE and other defects) and altered my own, that are working well together with the css/xhtml framework. panels is very modular here - very good job - but i don't need the css files anymore. So client<>server transactions for dummy css are not required.

catch’s picture

Status: Active » Closed (won't fix)