Programmatically change views title

Public

You can easily override and customize any view's title.

</> CopyGet raw version
php
  1. function MODULE_NAME_views_pre_render(&$view) {
  2. if ($view->name == 'your_view_name' && $view->current_display == 'page') {
  3. $view->build_info['title'] = t('Custom title');
  4. }
  5. }