Needs review
Project:
Facet API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2017 at 19:21 UTC
Updated:
27 Sep 2017 at 19:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
remydenton commentedComment #3
eugene.ilyin commentedHello.
Could you explain the case when it can be a string, please?
Comment #4
eugene.ilyin commentedComment #5
remydenton commentedMy use case was in theme preprocessing-- I wanted to know whether there was an active item for a given facet so that we could expand that particular facet block with javascript for small devices. In the preprocess function for the panels pane I was using, it was easy to find the machine name of the facet. But then in order to figure out whether it was active, I additionally had to use `facetapi_facet_load()` to load the facet.
Basically, it seemed silly that I had to do this:
When I could have just done this if the documentation for getActiveItems() had been correct :
Comment #6
remydenton commentedActually, on second glance, it's even more complicated than that-- you also need to pass a $searcher parameter to facetapi_facet_load().