Datafeedr Support Forums

Datafeedr Support Forums (http://www.datafeedr.com/forums/index.php)
-   Problems (http://www.datafeedr.com/forums/forumdisplay.php?f=68)
-   -   Several name based filters simultaneously (http://www.datafeedr.com/forums/showthread.php?t=4487)

trymv May 13th, 2011 08:11 AM

Several name based filters simultaneously
 
Hi

I am trying to develop the opportunity to use several word based filters or several name based filters.

I started with the following brilliant forum post and then added some too it:
http://www.datafeedr.com/forums/showthread.php?t=3853

The above mentioned forum post explains, among other things, how to display a
[X] Remove filter when a filter is already active. I have used the code from there to make my own color filter, but I have several filters that use name as a parameter, and I would like to be able to use them both at the same time.

The code at the bottom is copied from the above mentioned forum post and then extended to see which filter is actually in use. Now if I have two different filters using name as the parameters, it will allow me to display [X] Remove color filter under the appropriate filter.

Now if the color parameter is already chosen and I would like to use a name based shape filter in addition to that, it will just overwrite the color choice. I would like for the filter to remember the color choice and simply append the query with the shape.

I.e. in stead of going from ?name=Blue to ?name=square, I would like for it to go from ?name=Blue to ?name=Blue+square

This could be achieved if I could enter a variable in the following line in stead of a constant:
<li><a href="[server.url type='fullpage' query='name=Blue']">Blue</a></li>

I.e. something like
<li><a href="[server.url type='fullpage' query='name=$color+blue']">Blue</a></li>

Is there is a way around this, I would be very grateful to hear about it. Any help is appreciated.

My code is posted below:


<ul>
<?php if (substr_count(@$_GET['name'],'Blue') ||
substr_count(@$_GET['name'],'Black') ||
substr_count(@$_GET['name'],'Pink')){ ?>

<li><a href="[server.url type='fullpage' query='-name']">[X] Remove color filter</a></li>

<?php } else {
?>


<li><a href="[server.url type='fullpage' query='name=Blue']">Blue</a></li>
<li><a href="[server.url type='fullpage' query='name=Black']">Black</a></li>
<li><a href="[server.url type='fullpage' query='name=Pink']">Pink</a></li>

<?php }
?>

</ul>​

trymv May 13th, 2011 08:58 AM

Never mind. Found a work-around. Sorry to bother you :)


All times are GMT -5. The time now is 04:41 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.