Multiple custom layouts work slightly different
To have multiple custom layouts is not as straight forward than just adding another custom layout's folder and files to the sites/all/theme/mytheme folder. Chances are you'll end up with the WSOD.
Follow the steps on the previous page to create one custom layout with some naming changes:
Give a more general name that will be used for the:
- Folder
- The name in the theme.info file.
- In the name of the function in the inc file
For instance:
In folder customlayout you have:
- customlayout1.inc
- customlayout1.png
- customlayout1.css
- customlayout1.tpl.php
Where customlayout1 is of course the name of your layout. In the previous page this was onerowtwocols.
In the mytheme.info file you use:
plugins[panels][layouts] = customlayout
Your customlayout.inc file will look like this:
<?php
function mytheme_customlayout1_panels_layouts() {
$items['customlayout1'] = array(
'title' => t('Custom Layout 1'),
'icon' => 'customlayout1.png',
'theme' => 'customlayout1',
'css' => 'customlayout1.css',
'panels' => array(
'left' => t('Left side'),
'right' => t('Right side')
),
);
return $items;
}
?>Create the files for your next custom layout, buy you don't need to create another folder. Instead, put all files in the customlayout folder.
Add another customlayout.inc
<?php
function mytheme_customlayout2_panels_layouts() {
$items['customlayout2'] = array(
'title' => t('Custom Layout 2'),
'icon' => 'customlayout2.png',
'theme' => 'customlayout2',
'css' => 'customlayout2.css',
'panels' => array(
'left' => t('Left side'),
'right' => t('Right side')
),
);
?>So, now in folder customlayout you have:
- customlayout1.inc
- customlayout1.png
- customlayout1.css
- customlayout1.tpl.php
- customlayout2.inc
- customlayout2.png
- customlayout2.css
- customlayout2.tpl.php

WSOD
I had this working with no problems for the last two or three weeks then suddenly I got a WSOD on all custom layout panel pages. Now when I go into editor I can change the layout to one of the standard layouts and the content is all still there, but the custom layouts have disapeared from that selection page. I am so confused, all the files are still there, havent been deleted, I am using D6x and panels3. Anyone got any ideas?
multiple layouts lead to WSOD
Same here, one custom style works fine, when you add a second one the WSOD shows itself...
Same D6x and panels3.
Did you upgrade Panels recently?
I wrote the above using Panels 3.0
I am still using Panels 3.0 on a few sites where this still works.
What version is your Panels?
Im using Panels 6.x-3.2 from
Im using Panels 6.x-3.2 from october the 21st, on previous versions it did work
reset theme
sorry for the late reply. I am such an idiot, had this problem before what I had to do was reset the theme, then switch back to your custom theme. don't know why, this doesn't happen every time you add a custom theme.
Jana