Hi,

I'm trying to create a new panel layout, but I seem to get stuck at the theme parameter in the inc file.
When I set the theme parameter to mypanel, I have no possibility to enter content. When I set the parameter to a standard layout (e.g. panels_twocol), I can enter content, but it's not shown in my layout...

I suspect that my "theme" has to be declared somewhere else, but I have no clue where...

Any ideas?

kind regards,
Nicolas

Comments

Waldorf27’s picture

maybe some additional info, my inc file looks like this:

function panels_twocolndc_panels_layouts() {
  $items['twocolndc'] = array(
    'title' => t('Two column ndc'),
    'icon' => 'twocolndc.png',
    'theme' => 'panels_twocolndc',
    'css' => 'twocolndc.css',
    'panels' => array(
      'left_above' => t('Left above'),
      'right_above' => t('Right above'),
      'left_below' => t('Left below'),
      'right_below' => t('Right below')
    ),
  );

and it's the 'theme' => 'panels_twocolndc' where the system stumbles...

Jeff Burnz’s picture

'theme' => 'panels_twocolndc', is the name of the tpl file

however the problem is the function name is wrong, it should match your theme (unless you are hacking away at panels and putting this in the panels module, which is wrong...).

Waldorf27’s picture

Hi Jeff,

thanks for your reply.

My tpl file is called: twocolndc.tpl.php
So I changed the theme in the inc file to 'theme' => 'twocolndc', but that didn't help.

If I change the name of the function to mytheme_twocolndc_panels_layouts(), I can't choose my new layout when I want to create a new panel.
What I want is that I can go to Create content » Panel » Choose layout, and that I can see my layout there.

gr.
Nicolas