• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: LISE - search items with range slider
PostPosted: Thu Mar 14, 2019 2:54 pm 
Offline
Forum Members
Forum Members

Joined: Mon Dec 30, 2013 12:58 pm
Posts: 18
Has anyone idea and solution to replace the standard multiselect field with a modern range bar in LISE search template like attached?
I want to use this plugin: http://ionden.com/a/plugins/ion.rangeSlider/index.html
For now i have this
Code:
<input type="text" class="js-range-slider" name="{$actionid}search_{$fielddef->alias}[]" id="filter_{$fielddef->alias}[]" value="" />

Looks great - but not working...

Can anyone help with that?


Attachments:
filter.png
filter.png [ 6.07 KiB | Viewed 335 times ]
Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE - search items with range slider
PostPosted: Thu Mar 14, 2019 3:11 pm 
Offline
Forum Members
Forum Members

Joined: Fri May 19, 2017 1:03 pm
Posts: 24
Hi ,
Surely I can help you, but would like to know were you want to implement the same.

Thanks


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE - search items with range slider
PostPosted: Thu Mar 14, 2019 3:39 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 717
Location: Victoria, BC
Because LISE isn't using min/max for filtering, just a list of matches, it won't be straight forward to pass the min/max parameters to the filter function.

A method I used on one project was to pass those min/max values to my results template, and only include items that were within those parameters. It's not the most efficient if there's thousands of items, but on this project it worked really well.

I used Foundation's slider, but the theory is the same. The search form uses:
Code:
<div class="slider" data-slider data-start="{$min}" data-initial-start="{$smarty.post.size_min|default:$min}" data-initial-end="{$smarty.post.size_max|default:$max}" data-end="{$max}" data-step="100">


And the results page uses:
Code:
{if ($item->fielddefs.size.value >= $smarty.post.size_min|default:'0' && $item->fielddefs.size.value <= $smarty.post.size_max|default:'999999') || $item->fielddefs.size.value==''}


You can see it in action at https://www.zri.nl/projecten, click on "Filteren"

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE - search items with range slider
PostPosted: Thu Mar 14, 2019 8:17 pm 
Offline
Forum Members
Forum Members

Joined: Mon Dec 30, 2013 12:58 pm
Posts: 18
DIGI3 - I've implemented your solution and everything works ok for now.
BTW, I also changed the script for Foundation's slider.

Thank you very much :)
I hope this topic will help others too!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting