Hello

I have created a content type with two "body" fields - a main body, and a side-bar body. The side-bar body field may or may not be empty, and the intent is that a site editor may choose to put something in that region or not.

I have created a panel to display the two body regions, however, if the side-bar region is empty, we're left with a blank bar down the side. I'd like to have that region be hidden if there's no content.

I'm wondering if my best approach is to create a .tpl.php file for the panel, and add some logic there?

Thanks in advance!

Comments

merlinofchaos’s picture

Status: Active » Fixed

You need your layout template to be 'responsive' and able to handle that situation.

No current Panels layouts are responsive, so you would need to create your own layout, use the preprocess to set up the logic, and then have the template render appropriately. The techniques to do this are very similar to the techniques many themes use to have sidebars collapse when empty.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

andreymaximov’s picture