User login

Overide Panels CSS

panels override css

Due to this great code, it should just work. But it doesn't.

function panels_get_layout($layout, $content) {
  $output = theme($layout['theme'], check_plain($layout['css_id']), $content);

  if ($output) {
    if (file_exists(path_to_theme() . '/' . $layout['css'])) {
      drupal_add_css(path_to_theme() . '/' . $layout['css']);
    }
    else {
      drupal_add_css(drupal_get_path('module', $layout['module']) . '/' . $layout['css']);
    }
  }
  return $output;
}

Ahh: the way the code is written, it must be in a directory called 'layouts':

A little drupal_set_message($layout['css']); and all is revealed:

layouts/threecol_33_34_33_stacked.css

Resolution

Put your copies of threecol_33_34_33_stacked.css and brethren in yourthemename/layouts/ just like they're in panels/layouts/

Searched words: 
Drupal panels module override CSS

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.