By radu_d on
For my site I use a view to search all nodes that contains a keyword in title. For that I use a filter and I expose that filter. The problem is that I want to set the view page title accordigly with the search keyword. I try to do that on viewshook_views_pre_render but this seems to be called only once. If the user press refresh it is not called again.
function customhooks_views_pre_render(&$view) {
if($view->name == "search_categories")
{
if(isset($_REQUEST['category']))
{
drupal_set_title('Items in category: '. strtolower($_REQUEST['category']));
}
}
}
Does anyone succeded setting the view page title as one of the filters parameter?