Last active
October 12, 2015 19:58
-
-
Save ss81/4079378 to your computer and use it in GitHub Desktop.
How to change the title of a Drupal View via code
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 | |
| function customModule_views_pre_render(&$view) { | |
| if ($view->name == 'view_name' && $view->current_display == 'display_id') { | |
| // Here you can do any php you want to get the title you need for your view. | |
| $view->build_info['title'] = "My custom title!"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment