Creating custom browse facets with the Display Plugin
Feb 23, 2026 11:18 AM
I am building a custom plugin that needs to add new facets to the browse page. The ahgDisplayPlugin handles facet rendering, but I want to add a facet for our custom metadata field (conservation priority).
I've looked at the facet configuration in display_facet_config table, but I'm not sure how to register a new facet type that queries a custom table.
Has anyone extended the facet system?
2 Replies
The recommended approach is to extend the existing facet framework rather than creating a separate filter. Here's how:
- Add your facet definition to
display_facet_configwith acustomfacet type - Register a facet handler in your plugin's configuration class
- The handler receives the query builder and applies the appropriate WHERE clause
I can share a code example if you want — we did exactly this for the Heritage Accounting plugin.
That would be great, Johan! A code example would save us a lot of time. Particularly interested in how the facet handler registers itself — is it via the dispatcher events or direct class registration?