Last active
August 29, 2015 14:03
-
-
Save flashvnn/5776e84203c9ce9230ae to your computer and use it in GitHub Desktop.
panels-layout classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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