[TYPO3-Solr] Facet conditions

Sergio Catalá scatala.enet at gmail.com
Mon Mar 4 18:59:35 CET 2013


Hi list,

I created several facets and I'm using my own html template for the 
search form. Now I just wanted to add a hidden parameter in this search 
form. This parameter value depends on the facet that is selected in the 
page in this moment. I've seen it is possible to use condition markers 
like this in the template:

###IF:###FORM.Q###|!=|###
<input type="hidden" name="tx_solr[filter][1]" value="my_facet:all" />
###IF:###FORM.Q###|!=|###

But I would like to use, instead of "a term was introduced for the 
search" condition, "the facet X was selected" condition.

My goal would be something like that (I know these markers are wrong, 
it's just to express the idea):

###IF:###FORM.FILTER###|==|my_facet:all|###
   <input type="hidden" name="tx_solr[filter][1]" value="my_facet:all" />
###IF:###FORM.FILTER###|==|my_facet:all|###
###IF:###FORM.FILTER###|==|my_facet:news|###
   <input type="hidden" name="tx_solr[filter][1]" value="my_facet:news" />
###IF:###FORM.FILTER###|==|my_facet:news|###

Anyone knows whether this is possible?

Thanks in advance,
Sergio Catalá


More information about the TYPO3-project-solr mailing list