I'm trying to set a custom title for my Views display by programmatically doing a drupal_set_title() within the Global PHP footer. But it seems that its not firing as I think its firing before the page is rendered.

How can I programmatically set the title of the page using Global PHP within the footer? I want to tap into the results data to create a custom title using drupal_set_title().

  • What do you mean by "Global PHP footer"? Are you talking about a footer region? A footer template file? You could certainly do this in a views pre render function. – cdmo Jul 12 '13 at 20:08
  • no i mean the footer section of the view display. where it says header / footer. you can insert a PHP field in there. – Patoshi パトシ Jul 12 '13 at 21:02
  • I would recommend disabling the PHP input filter and moving any of your custom PHP to either a custom theme or a module. This is good advice from the bots, lullabot.com/blog/articles/drupal-input-formats-and-filters – cdmo Jul 13 '13 at 11:11
  • i understand i can take the route of making a module to do this simple task, but it is just that, a simple task. All i want is to set a title nothing more. im particularly looking to just set the title without having to create extra files I need to keep track of. – Patoshi パトシ Jul 14 '13 at 23:58

Browse other questions tagged or ask your own question.