![]() |
|
Home | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]() 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> - 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
|
||||
|
||||
![]() Hi
You can combine the links above to create 2 removal links like this: <a href="[server.url type='fullpage' query='-brand&-price&-merchant']">[X] Remove ALL Filters</a> <a href="[server.url type='fullpage' query='-price']">[X] Remove Price Filter</a> Yes, you can make another widget to handle this functionality. You can create as many widgets as you want. Eric
__________________
![]() ![]() ![]() ![]() |
#3
|
|||
|
|||
![]() Thanks, I figured this out myself too
![]() I would like to make a global remove all filter in a separate widget. (I would make this widget without a title, so it will only be 'seen' when the remove all link gets displayed) I need a code for removing Price, Word, Brand filters together in one step with one click. I want this to be in a separate widget. Of course, this Remove all link should be displayed every time if any of those filters are set, or any combination of those filters are set, and it should NOT be displayed when they are no filters set. Last edited by feri : March 5th, 2011 at 06:18 PM. |
#4
|
||||
|
||||
![]() Hmm.... I'm still not 100% sure I understand exactly what you need but here's an attempt:
The following code will display a "Remove all filters" link only when a price, word and/or brand filter is present: HTML Code:
<?php if (@$_GET['price'] || @$_GET['word'] || @$_GET['brand']) { ?> <a href="[server.url type='fullpage' query='-price&-word&-brand']">[X] Remove ALL Filters</a> <?php } ?>
__________________
![]() ![]() ![]() ![]() |
#5
|
|||
|
|||
![]() Thank you very much! It's 100% what I needed!
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating filters that do the work of categories | Eric | Tips, Tricks & Tutorials | 60 | December 1st, 2011 02:57 PM |
Custom filters | ccgmark | Questions | 1 | February 25th, 2011 04:10 PM |
Bulk edit subscriptions/filters for categories | feri | Feature Requests | 1 | February 19th, 2011 10:41 AM |