Created a panels page with the 'flexible' layout with Canvas > Column > Row as the main parent container and 3 column/row/region sets within it. I add a CSS Class to the main parent Row Settings and the panel page does not render the custom class (or any other custom classes added throughout the layout). I add one additional sister to the parent Row below the parent Row and the panel page starts rendering the custom classes. Have repeated this a couple times now in the project. So I end up with one additional empty row in the layout to get the custom classes to render. The bug seems to be around layouts that have only one parent level row.
Attaching a txt file of a sample export. This sample has only one parent row with Row Settings CSS Class added of "solid-block-row". This version does not render this class. If you take this sample and add an additional row as described above the class starts rendering.
| Comment | File | Size | Author |
|---|---|---|---|
| sample-panel-page.txt | 5.86 KB | jeffrey.dalton |
Comments
Comment #1
merlinofchaos commentedA better workaround is probably to put your class on the canvas (or column if you have multiple columns) rather than add empty rows -- the whole idea is that unnecessary rows aren't rendered.
I suppose I should add a check; if the row has a class attached to it, it must be rendered.
Comment #2
jeffrey.dalton commentedSorry if I wasnt clear... I put the class on the row that I am using but it only renders if I add an additional row to the layout. The one row layout fails to render the class that has been added to it.
Comment #3
merlinofchaos commentedRight. What I'm saying is that the div for the row won't render if there is only one row, because that div isn't actually needed. The class can be placed on the next level up and still work.
Comment #4
Letharion commentedIn an effort to clean up the many hundreds of open issues in the Panels queue, I'm going over all bug reports. If they haven't been updated in over a full year,
I'm going to assume that they no longar affect any one, and close it. I realise that some issues will be closed, that should remain open.
If this is the case, and you still have an interest in this issue, please just re-open it, setting the appropriate status, and providing exports and detailed instructions for reproducing the error.
Comment #5
awolfey commentedThis is actually still the case. With a single row and a single region, row classes are not added. With 2 rows, classes are added.
Comment #6
merlinofchaos commentedAs I said in #3, this is intentional behavior. This is a feature, not a bug.
Comment #7
VanessaM commentedI have a feeling that I have an issue which is related...I have a row-->column--then 2 rows containing 1 region each:
-row
--column
---row1
----region
---row2
----region
I am able to add a class to the rows, but when adding a class to the column, it is ignored, i.e not printed. Also no extra div is created for the column. Is this also intended?
Comment #8
ani7a commentedMy workaround:
in the function:
function panels_flexible_render_item($renderer, $item, $content, $id, $position, $max, $clear = FALSE)
Change:
if (empty($renderer->admin) && $item['type'] == 'row' && $max == 0 ) {
For:
if (empty($renderer->admin) && $item['type'] == 'row' && $max == 0 && !$item['class'] ) {