Developer forum

Forum » Rapido » Default filtering on page

Default filtering on page

Eva Sommer
Reply

Hi,

is there somehow a possibilty to choose predefinend/default filtering option when entering a page fx a category. Or maybe on a higher level.

Fx always have 'herre' picked like so, instead of the user having to select it themselves.

We have tried attribute way on the query with fx Herre;

But then it overwrites all others and cannot be deselected

Cannot un select. the page just loads and then selects it again



Thank you 

- Eva Sommer


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Eva,

 

The way you did it might work if you choose to "Show facet options with no results".

 

But that may have unexpected behaviors as well, because it will do that for all facets. I've see a similar request in the past from customers, but what they wanted was either navigation (not faceting) OR wanted some facets to behave differently than others (in which case you will need to do this custom - show facet options with no results be checked but then hide them in the template for the ones you don't want). The later option is not great because it's handling an excess of data to simply be discarded, but may be what you need.

 

Best Regards,

Nuno Aguiar

 
Eva Sommer
Reply

Hi Nuno,

thank you for your reply. I will try and test Show facet options with no results. I am a little unsure where to set this, though. Is it here in the facet you mean? There are already set to always. Or am I looking in the wrong place? :)

 

 

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Eva,

 

Is this a Swift or Rapido site? In Swift that should be the very first paragraph of the Products page, the one used to render the data.

 

Best Regards,

Nuno Aguiar

 
Eva Sommer
Reply

Hi again, it is a Rapido site :)

I tried with Show facet options with no results , but it did not fix the issue. 

Is there some other way to preselect a facet?

- Eva Sommer

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Eva,

 

If all you want is to simply select the checkboxes, you can also do it with a simple piece of javascript. You can use Rapido hooks to trigger it once the product list has loaded

 

RapidoHook.productListLoaded(function() {

// Your javascript code

}

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum