1

I have a View with two exposed filters (in a block):

  1. Select list with 4 options (lets say cats, dogs, horses and birds)
  2. Autocomplete text field for tags

I am using Exposed Filter Data and Better Exposed Filters modules.

I am trying to use the exposed filter(s) as the title of the View. There is no problem with the autocomplete text field (Views gets the value from the field and sets it as the title), but when you select one of the terms of the select list, Drupal prints the tid (a number) instead of the term name (“cats”...).

I have added the php snippet in the view´s header as pointed out in Exposed Filter Data module’s page:

<?php
print get_exposed_filter_output();
?>

I have tried replacing the text manually with Javascript (.replace), but this is not a valid solution because these terms might change in the future.

I have also tried looking at exposed_filter_data.tpl.php, but I couldn’t find a solution. This trick (page title from the Views Exposed filter term using contextual filter) doesn’t work for me either: I can only use one field as the View title, and I need both of them.

In short, I need to print the name of the taxonomy term, NOT the tid (a number).

  • Please attach the screen shot for this problem and what you write the code into the header for print. – Kamal Oberoi Nov 6 '15 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.