Hi,
I am using facet api and search api and I am trying to make the facets collapsible through collapsiblock. But even though the selectors are pretty straight forward, I can't do it....
A typical facet is:
<div class="block block-facetapi collapsiblock-processed" id="block-facetapi-nps-zjsjqhpw-iinw21semqkhwrrbfk6">
<h2>Filters</h2>
<div class="content">
<div class="item-list">
<h3>Search found 5 items</h3>
<ul>
<li class="first last">[all items]</li>
</ul>
</div>
</div>
</div>
And the selectors I use are:
div.block
h2:first
div.content
It should work! Right?
Any help would be very welcome...
P.S. And all other blocks are collapsible.
Comments
Comment #1
matrixlord commentedOk, I found the problem.
Facet api uses a combination of upper and lower case letters but when it comes to javascript it is only lower case.
So the script cannot find the divs by id(so it is not working).
The easiest solution is to change line 20 of collapsiblock.module
from:
to:
I am not sure if this is a bug. But I attached a patch anyway.
Comment #2
matrixlord commentedComment #3
auraell commentedThanks for the patch! Works with Apache Solr Search blocks too!
Comment #5
gagarine commented@auraell never close a bug if it's not committed!
Comment #6
gagarine commentednow it's commited
Comment #8
sergio morais commentedfor some reason the patch is not committed anymore
Comment #9
sergio morais commentedComment #10
gagarine commentedIt's commited in dev version. I will create a release soon.