Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you want to create a basic style plugin which applies styling to items placed using Panopoly, you will first need to create a custom module and set it up to use Panel's hooks. Afterwards, you create a plugin file located inside your module directory at plugins/styles/style_name.inc that looks like this:
<?php
$plugin = array(
'title' => t('A Dark Blue Background'),
'description' => t('Wraps panes in the Drupal dark blue style.'),
'render pane' => 'panopoly_example_dark_blue_background_render_pane',
'weight' => -10,
);
function theme_panopoly_example_dark_blue_background_render_pane($vars) {
$content = $vars['content'];
$pane = $vars['pane'];
$display = $vars['display'];
$plugin = $vars['style'];
$content->css_class .= ' pane-dark-blue-background';
return theme('panels_pane', array('content' => $content, 'pane' => $pane, 'display' => $display));
}
And a little bit of CSS:
.pane-dark-blue-background {
background-color: #0678be;
padding: 1em;
}