View Single Post
  #1  
Old March 5th, 2011, 12:49 PM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default Remove ALL Filters

I was working with the Filter Tutorial, it's awesome. I want to implement a feature called Remove ALL Filters set.

I've found this in the Documentation to remove all filters set.
Code:
<ul>
	<li><a href="[server.url type='fullpage' query='-brand&-price&-merchant']">[X] Remove ALL Filters</a></li>
</ul>
The question is how to modify the Filtering Widgets to display BOTH
- remove ALL filters
- remove price filter (if it's a price filter)

Code:
<ul>
<?php if (@$_GET['price']) { ?>

  <li><a href="[server.url type='fullpage' query='-price']">[X] Remove price filter</a></li>
<?php } else { ?>
  <li><a href="[server.url type='fullpage' query='price=-150']">Less than 150</a></li>
  <li><a href="[server.url type='fullpage' query='price=150-300']">150 ~ 300</a></li>
  <li><a href="[server.url type='fullpage' query='price=300-550']">300 ~ 550</a></li>
  <li><a href="[server.url type='fullpage' query='price=550-']">More than 550</a></li>
<?php } ?>
</ul>
2. Question: could it be possible to make a separate Widget with Remove All functionality? I think yes, just the question remains how to hide this widget when there are no filters set.