0

I wanted to make a slight variation of a .tpl layout a plugin uses. To do that I simply when into the plugins file structure and duplicated one of its layout folders and renamed the files within (.css, .tpl and .inc). I then made the changes to the .tpl file.

In the .inc file I find:

$plugin = [
  'title' => t('Two Col 50/50'),
  'category' => t('Foundation'),
  'icon' => 'icon.png',
  'theme' => 'foundation_twocol_50_50',
  'admin css' => 'foundation-twocol-50-50.css',
  'regions' => [
    'left' => t('Left'),
    'right' => t('Right'),
  ],
];

All I did here was alter these names slightly to:

   $plugin = [
      'title' => t('Two Col 70/30'),
      'category' => t('Foundation'),
      'icon' => 'icon.png',
      'theme' => 'foundation_twocol_70_30',
      'admin css' => 'foundation-twocol-70-30.css',
      'regions' => [
        'left' => t('Left'),
        'right' => t('Right'),
      ],
    ];

I then refreshed my cache and theme registry, but the new 70/30 option does not appear when I go to swap layout for the mini-panel I'm working on.

Is there something I must do to 'tell' drupal this new layout exists?

0

I assume this is a Panels layout and Drupal won't discover it. You have to manually add it to the theme's .info file like this:

plugins[panels][layouts] = your_new_layout_name

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.