pass the clicked value to expose filter

127 Views Asked by At

I have the list item 'Articles','Brouchers','Videos' in view tpl page and created expose filter for content type 'Articles','Brouchers','Videos' and expose the filter with auto submit in view page hidden it using css.I want to trigger expose filter when I click the list item.

For expample when I click video I want to pass the value to expose filter and trigger the same thing as when I change to 'video' in expose filter dropdown in drupal 7.

<ul class="nav nav-justified"> <li><a href="Articles" class="Articles">Articles</a></li> <li><a href="Brouchers" class="Brouchers">Brouchers</a></li> <li><a href="Videos" class="Videos">Videos</a></li> <li><a href="Webniars" class="Webniars">Webniars</a></li> </ul>

1

There are 1 best solutions below

0
Ujjval Jha On

Suppose your view path is YOURSITENAME/list-test
and when you search to choose an expose filter option then your url is
YOURSITENAME/list-test?field_list_items_value=Brouchers

Then create a ul nav like this way...

<ul class="nav nav-justified">
  <li><a href="list-test?field_list_items_value=Articles" class="Articles">Articles</a></li>
  <li><a href="list-test?field_list_items_value=Brouchers" class="Brouchers">Brouchers</a></li>
  <li><a href="list-test?field_list_items_value=Videos" class="Videos">Videos</a></li>
  <li><a href="list-test?field_list_items_value=Webniars" class="Webniars">Webniars</a></li>
</ul>

I think this may be useful for you...