Theming a panel region

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.

Groups:
Login to post comments

css and panes

downunder_al - Wed, 2009-11-18 05:08

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
boaz_r - Wed, 2009-11-18 08:16

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 - Wed, 2009-11-18 12:22

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 - Wed, 2009-11-18 05:13

Did you clear the cache?


Css and panes and the cache

downunder_al - Wed, 2009-11-18 05:23

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 - Wed, 2009-11-18 19:27

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
boaz_r - Wed, 2009-11-18 20:57

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 - Wed, 2009-11-18 22:05

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 :-)