`panels_flexible_render_item` function of flexible layout plugin does strange things which are simply can't be explained from user point of view.
In admin UI of flexi layout columns and rows, there is field for setting CSS-class field. The help text states:
Enter a CSS class that will be used. This can be used to apply automatic styling from your theme, for example.
Good. But this isn't true actually since no rows or columns markup is created if you have only 1 column and 1 row with some regions in it:
function panels_flexible_render_item($renderer, $item, $content, $id, $position, $max, $clear = FALSE) {
// If we are rendering a row and there is just one row, we don't need to
// render the row unless there is fixed_width content inside it.
if (empty($renderer->admin) && $item['type'] == 'row' && $max == 0) {
$fixed = FALSE;
foreach ($item['children'] as $id) {
if ($renderer->settings['items'][$id]['width_type'] != '%') {
$fixed = TRUE;
break;
}
}
if (!$fixed) {
return $content;
}
}
// If we are rendering a column and there is just one column, we don't
// need to render the column unless it has a fixed_width.
if (empty($renderer->admin) && $item['type'] == 'column' && $max == 0 && $item['width_type'] == '%') {
return $content;
}
This code does nothing useful and I think it should be removed.
I marking this as a bug. Steps to reproduce:
1) Create a flexi panel with 1 col 1 row and some regions and place content there.
2) Configure column and/or row and set some CSS class to them.
3) When the panel is rendered, they are no any classes.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1852532-2.patch | 811 bytes | Angry Dan |
Comments
Comment #1
OnkelTem CreditAttribution: OnkelTem commentedComment #1.0
OnkelTem CreditAttribution: OnkelTem commentedUpdated issue summary.
Comment #1.1
OnkelTem CreditAttribution: OnkelTem commentedUpdated issue summary.
Comment #2
Angry Dan CreditAttribution: Angry Dan commentedI agree! I spent ages trying to work out why my classes weren't appearing. I hadn't thought of removing all of the code... I went for a patch (attached) instead but whatever to rid this irritation.