You are here

20 August 2011

Sometimes it's hard to set the title you want for your views. So you have to do this programmatically in your module. This snippet shows you how.

Source code viewer
  1. // Don't forget to replace HOOK with your modules name.
  2. function HOOK_views_pre_render(&$view) {
  3. if ($view->name == 'taxonomy_term' && $view->current_display == 'page') {
  4. drupal_set_title('Your Page Title');
  5. }
  6. }
Programming Language: PHP