Needs work
Project:
Facet API Bonus
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2012 at 07:59 UTC
Updated:
23 Oct 2012 at 06:26 UTC
In case a user does not have rights to access an entity, facetapi returns the entity_id instead of the name in the #markup, but it is not excluded from display and looks kind of ugly.
This plugin allows them to be excluded from display.
Hope this can be added to the next release.
This plugin was developed for the Devtrac project and sponsored by Unicef Uganda.
| Comment | File | Size | Author |
|---|---|---|---|
| facetapi_bonus_exclude_inaccessible_items.patch | 3.5 KB | Jan van Diepen |
Comments
Comment #1
ygerasimov commentedThank you for the patch. I am not quite sure how to build the facets where each item is an entity? I guess it should be something like entity reference field.
Could you please provide step by step instructions for this?
Comment #2
Jan van Diepen commentedThe use of the name "entity" put you a little bit of track, I guess.
The particular problem we had actually involved taxonomy terms. We used taxonomy_access to regulate access to the different taxonomy terms. Now, when we created a facet on the terms of a particular vocabulary, all terms used in the result set where showing as items in the facet. The ones we had access to showed as term name and the ones we did not have access to showed as term id. The desired behavior would be to only show the names of the terms we had access to.
The plugin we wrote does exactly that. It filters out the inaccessible items on the facet.
Hope this clarifies it a bit.