Would be nice if output could be a human readable
Thanks!

Comments

shushu’s picture

Assigned: Unassigned » shushu

If you know the fields you want, all you need to do is create your own template file.

From the module's directory copy the file exposed_filter_data.tpl.php to your own theme directory.
Change this file any way you like to make it nicer.
Use the existing CSS file exposed_filter_data.css, or in you theme css files to fit to your needs.

Remember to flush your cache to see the changes.

Let me know if you need any additional help.

taras80’s picture

The result of two exposed filters is: Filtered by:
tid:Arraytid_1:1182 Need further instructions for my little knowledge. Thanks

shushu’s picture

Your exposed filter uses some ID as the actual value it is being filtered by.
I guess that tid is related to tid - do you filter by taxonomy terms ?
If so, in your tpl file try to print out some more data to see if it gets you somewhere:
print_r($tid);
and
print_r(taxonomy_get_term($tid_1));

Let me know if you manage from here.

taras80’s picture

The result says Filtered by:
tid:1
How to display term name not ID?

rburgundy’s picture

subscribing

TravisJohnston’s picture

I am in need of this as well. I am trying to print out the data in 2 ways.

1) trying to create a sort of "breadcrumb" to show the applied filters

2) would like to print out the applied filter for only 1 filter though, not all exposed filter on page.

drupal_user007’s picture

Hallo,

copy the exposed_filter_data.tpl.php in your theme's folder and change the file to:

<?php

/**
 * @file
 * Basic template file
 */

?>
<div class='exposed_filter_data'>
  <div class='title'>Filtered by:</div>
  <div class='content'>
    <?php
      foreach ($exposed_filters as $filter => $value) {
      if ($value) {
          print "<div class='filter'><div class='name'>" . $filter . ":</div>";

/*changing start*/
          $taxname=taxonomy_term_load($value);
          print "<div class='value'>" . $taxname->name . "</div></div>";
/*changing end*/

       }
     }
   ?>
  </div>
</div>
shushu’s picture

Status: Active » Closed (fixed)
jrock526’s picture

Hello,

I am getting the following error with the above code. Thanks ahead of time.

Parse error: syntax error, unexpected T_FOREACH in /opt/blah/stage.blah.com.git/web/modules/exposed_filter_data/exposed_filter_data.tpl.php on line 11

drupal_user007’s picture

Hallo jrock526,

did you set all semicolons?

Yuri’s picture

How can this be achieved with an entity reference exposed filter using nodes instead of terms?

Yuri’s picture

Issue summary: View changes
Status: Closed (fixed) » Active
meramo’s picture

#7 worked for me. Thanks!