Theming a panel region

Events happening in the community are now at Drupal community events on www.drupal.org.
boaz_r's picture

Hi,

I'm looking for a way to theme panels (3) regions via templates. I know how to theme a layout via template, how to theme a pane (as a box), and can also add ID to a panel and thus have CSS control over regions. But, what is needed is to use a custom template for each region in a layout.
How do I do that?

TIA,
Boaz.

Comments

css and panes

downunder_al's picture

If you go into layout designer, then (left) click the region you are interested in, choose region settings, you can set the css class along with the region title.

However, I can't get the css working on panes. I set the css-class and css-id on the pane in the content screen, but they don't show up in the generated html, so I can't style it. Any thoughts?

not helpful

boaz_r's picture

while your problem stands on its own, deserve a post of its own (somewhere), and relates to mine, i already stated that i know I can add that CSS classes like you suggested and what I look for is using template files on regions, not general styling tips on regions.

Boaz.

Boaz
PHP therapist

you are probably right

downunder_al's picture

Sorry, misunderstood your question. I will promote my question to a full discussion of its own. Though possibly not right now (it being 11:30 at night and past my bed-time)

Did you clear the cache?

buttonwillowsix's picture

Did you clear the cache?

Css and panes and the cache

downunder_al's picture

yes- at least I went to admin -> settings -> performance and cleared the cache there. i have the panes set to "no cache".

Create custom style using hook

gdud's picture

It isn't exactly, what do you need, but you can create your own region style (or some style) like "Rounded corners" using hook_panels_style_info() and related.

you are in a good direction

boaz_r's picture

you are right and this is a good direction, but unfortunately its so undocumented - nothing official, and panels 3 lacks even more documentation.
For now the need to theme a region via a template was postponed so I could check the few internet resources only when i get back to this task.

Thanks!

Boaz
PHP therapist

Creating style is easy

gdud's picture

You are right documentation for panels 3 is actualy poor. But creating new region style is very easy. Just look at default styles include in panels. First time I done my style in half hour :-)

Panels

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week