Change page title from Views preprocess function

by MrUpsidown   Last Updated August 14, 2019 12:07 PM

I want to be able to change the main page title based on some value that I get in a views preprocess function.

The View is displayed as a page.

function MYTHEME_preprocess_views_view(&$variables) {

  // Can I set the page title from here?
}

Any idea?

Tags : views 8


Related Questions


Alter the moderation state in the Content view Drupal 8

Updated February 28, 2018 21:07 PM


Group items in Views by value in Field Collection

Updated July 20, 2015 13:03 PM

List of referenced entities appended to a node

Updated January 12, 2017 08:03 AM