Just wondering what the consensus might be for having Panels 3 plugin styles & layouts be inheritable by sub-themes. I know it's something we'd really like to have available and would be willing to help with in whatever way we can.
I've noted elsewhere that the theme .info file is beginning to be the site of a growing number of settings for modules and themes (panels, skinr, zen): http://drupal.org/node/301295#comment-1762706, and a comprehensive solution might be preferred.
In the meantime, I've submitted a patch for the Skinr module to add .info-based theme inheritance for Skinr styles: http://drupal.org/node/506836.
I haven't dug into the Panels 3 plugin code yet, so I don't know if there are any serious internal barriers to theme inheritance of plugin styles & layouts, but I wanted to get an idea as to whether this was something that was desirable and whether I'd be better off pursuing it at the module level and/or pushing for a more general .info-based inheritance solution in core.
Comments
Comment #1
merlinofchaos commentedI'm not sure of the value of inherited styles and layouts, because themes do not actually need to be active to provide the styles. At the moment they need to be enabled, but that restriction is actually artificial and I made it mostly so that installed themes that were not in use would not clutter the layouts and styles. But because enabled has other meaning, that isn't necessarily the best way to do it.
Comment #2
sociotech commentedAh okay, so--as currently coded--plugin styles and layouts from all enabled themes are all available to Panels, regardless of whether or not they are the active theme. Then I agree, inheritance is a moot point. So if the parent(s) of a sub-theme were enabled, then all of their styles and layouts would be available to Panels. And to remove any styles or layouts, the user would just disable the themes that provided them. Correct? Thanks.
Comment #3
merlinofchaos commentedThat is exactly correct!
My one concern is that 'enabled' means that users (with the proper permission) can change their theme. This isn't a problem for most Drupal sites, as nobody ever enables user changing themes. But it does mean that any site that *does* have user changing themes enabled may run into a conflict by using this.
That and Drupal has a bug where the active theme might not actually be enabled.
Comment #4
Jerome F commentedI understand that this won't be fixed.
I just posted that in case anybody get stuck as I did, or perhaps I didn't understand something.
I use adaptative theme* and my subtheme.
I tried to add a custom panel layout in my subtheme.
I followed every steps in : http://drupal.org/node/495654 to create a custom layout.
It works fine in the adaptative theme's parent folder. But if I put my layout in my subtheme folder it doesn't**.
Nor does it work in my admin subtheme (as of step 9. in the tuto, as I use a different theme for the admin, I shouldn't expect it to work in my subtheme).
So if a parent theme makes use of hook_panels_layouts() the subtheme can't do it too, is that true ?
In conclusion I assume that I have to put my layout in the adaptativetheme folder along with the other AT panels layouts.
And not to forget that when I update Adaptative theme.
____
* Panels plugins are enabled in the parent folder of adaptativetheme
** I did put the following in my subtheme .info file
;----------// Panels
plugins[panels][layouts] = panels
Comment #5
mlconnor commentedI'm running Zen and I couldn't get a sub-theme layout to get picked up by Panels. I had to push it over into the Zen theme layouts folder which is bad for obvious reasons. Any ideas here?
Comment #6
friolator commentedsame issue as mlconnor - we're using Zen as our base, but none of our custom panels styles are working properly in the subtheme.
We are able to see our styles (they appear in the pop-up window when selecting the style), but they don't display. If we choose one of Panels' built-in styles, like Rounded Corners, we get the style.
Is there a solution to this? we're using the instructions from http://activelamp.com/blog/advanced-drupal-theming-using-panels-part-1-e...