Created
September 10, 2012 09:32
-
-
Save klaasvw/3689923 to your computer and use it in GitHub Desktop.
Hide a page title on a certain page view.
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 | |
/** | |
* @file | |
* Hide the page title on a page view snippet. | |
*/ | |
/** | |
* Implements template_process_page(). | |
* | |
* Removes the regular page title from news pages. | |
*/ | |
function via_news_process_page(&$variables) { | |
// Only hide the title on the view index page. | |
$view = views_get_page_view(); | |
if ($view && $view->name == 'news' && $view->current_display == 'page_1') { | |
$variables['title'] = NULL; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that you can also use hook_page_build.