I've searched everywhere for an example of the statement needed in the theme.info file so that the theme can store Panels 3 layouts. I've tried both:

plugins[panels][plugins] = layouts

and

plugins[panels][layouts] = layouts

...and put my custom panels layouts into layouts/test inside my theme, where test is the name of my panel layout, and contains test.inc, test.css and test.png.

However it refuses to work. Can someone enlighten me?

Comments

plugins[panels][layouts] = layouts is the correct one.

The other issue you might be facing is naming.

In test.inc you should have this code:

<?php
 
function THEMENAME_test_panels_layouts() {
   
// return your layout here
 
}
?>

Finally, the other issue is that your theme must be marked as 'enabled' on the themes page. It is possible to have the primary theme active but not enabled (This is a bug in Drupal itself) so please be sure to doublecheck that.

Status:Active» Closed (fixed)

Thanks for such a prompt reply... it now works for me!

I had the wrong function name. Instead of:

function THEMENAME_test_panels_layouts()

I had

function panels_test_panels_layouts()

because I developed this particular layout inside the panels layouts directory then moved it into my theme.

Thanks again!

Version:6.x-1.x-dev» 6.x-1.0-beta3
Component:Documentation» Code
Status:Closed (fixed)» Active

Unfortunately it seems this has broken in the later versions of the module. It broke in beta 1 I believe, and I have just upgraded to beta 3 without any better results.

Basically, I had it working, and have changed nothing, but now none of the layouts in my theme directory are found, even though they're still specified in my theme's .info file.

Sorry, I should mention I have temporarily copied my custom layouts into the panels/plugins/layouts folder and they work fine there (after modifying the hook_panels_layouts() function names appropriately).

Status:Active» Postponed (maintainer needs more info)

I just doublechecked and this is still working.

HOWEVER.

There is a bug in Drupal that can cause the theme to no longer show up as enabled (even if it is the default hteme). For CTools to recognize it, it must be marked enabled. So doublecheck at admin/build/themes and make sure this did not happen.

Status:Postponed (maintainer needs more info)» Closed (fixed)

Thanks again Merlin. Indeed you are right — my theme was mysteriously disabled, even though it was still in use throughout the site!

All layouts are again picking up fine from within my theme.

Hi merlin,

I think I am encountering the same problem, but I cannot enable any theme including the ones that come with core! I have been searching for info on this over at the Drupal issue queue but to no avail. You mentioned that this was a bug, do you know if there is a patch or have the link to the issue at all?

thanks!

acctually, sorry for being an idiot. i just reset to default and then was able to enable themes again!