Alter Views title programmatically on Drupal 8 By editor, 1 November, 2018 Question How to set title of a views page programmatically ? function MYMODULE_views_pre_render(ViewExecutable $view) { if ($view->id() == 'ABC') { $view->setTitle('MY CUSTOM TITLE'); } } Tags Drupal 8 Code Views Hook Alter a view. Edit view result programmatically Custom Views Data handler for a custom Entity on drupal 8