Created
April 3, 2012 08:20
-
-
Save anthonyringoet/2290408 to your computer and use it in GitHub Desktop.
Remove contextual links when using Semantic Views to cleanup view rows - drupal
This file contains 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 | |
/** | |
* Implements template_preprocess_views_view | |
* if we're using Semantic Views to remove all the rows, | |
* things can get messy with nth-child selectors in css because | |
* of the dirty contextual links in the title_suffix. | |
* Remove them automatically when using Semantic Views and stripping out row markup. | |
*/ | |
function YOURTHEME_preprocess_views_view(&$vars) { | |
$view = $vars['view']; | |
if(isset($view->style_plugin) && isset($view->style_options)){ | |
if(get_class($view->style_plugin) == 'semanticviews_plugin_style_default' && $view->style_options['row']['element_type'] == ''){ | |
unset($vars['title_suffix']); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment