eposed filters drupal seo

Printing page titles with views exposed filters - added to contextual filter argument with taxo id + depth....
// singlefilter//

$view = views_get_current_view();
$term = 'all';
$title = 'Fitted Modular Wardrobes';
if (isset ($view->exposed_input['field_carcass_wood_tid_selective'])) {
$tid = $view->exposed_input['field_carcass_wood_tid_selective'];
if (is_numeric($tid)){
$term = $tid;
$term_obj = taxonomy_term_load($tid);
$title = $term_obj->name;
}
}
$argument->validated_title = $title;
return($term);


// double filters///


$view = views_get_current_view();
$term = 'all';
$title = 'Fitted Modular Wardrobes';
if (isset ($view->exposed_input['field_carcass_wood_tid_selective']) && ($view->exposed_input['field_matt_finish_tid'] )) {
$tid = $view->exposed_input['field_carcass_wood_tid_selective'];
$tidx = $view->exposed_input['field_matt_finish_tid'];
if (is_numeric($tid)){
$term = $tid;
$term2 = $tidx;
$term_obj = taxonomy_term_load($tid);
$term_objtwo = taxonomy_term_load($tidx);
$title = $term_obj->name . $term_objtwo->name;
}
}
$argument->validated_title = $title;
return($term);

Tags: