Skip to content

Instantly share code, notes, and snippets.

@flashvnn
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save flashvnn/5776e84203c9ce9230ae to your computer and use it in GitHub Desktop.

Select an option

Save flashvnn/5776e84203c9ce9230ae to your computer and use it in GitHub Desktop.
panels-layout classes
<?php
$wrapper_classes = array();
$item = menu_get_item();
if ($item['path'] == 'blog' ||$item['path'] == 'taxonomy/term/%' || $item['path'] == 'posts-date/%') {
$wrapper_classes[] = 'blog';
}
if (isset($vars['node']) && $vars['node']->type == 'article') {
$wrapper_classes[] = 'blog-single';
}
?>
<?php if (in_array('blog', $wrapper_classes)): ?>
<section class="main <?php print implode(' ', $wrapper_classes); ?>">
<?php print $content['main']; ?>
</section>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment