0
votes

I'm using Drupal 6 views to create pages. I would like the page title to be whatever the user selects from an exposed filter I'm using. How do I get the selection from the exposed filter to be the page title? I've inserted the following php code into the header window, and selected php as the input. The result is that the page is titled Program: Thank you for your help.

<?php
$view = views_get_current_view();
$program = $view->exposed_input[field_program_value] ;
drupal_set_title('Program: '. $program->title);
?>
1

1 Answers

0
votes

Use form alter and set page title using drupal_set_title() in that. add condition for $_GET or $_POST to avoid setting title when no filter selected.