Creating custom browse facets with the Display Plugin

Question
42
Henrik Larsson
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?

plugin facets display development customization

2 Replies

Johan Pieterse Feb 24, 2026 11:18 AM

The recommended approach is to extend the existing facet framework rather than creating a separate filter. Here's how:

  1. Add your facet definition to display_facet_config with a custom facet type
  2. Register a facet handler in your plugin's configuration class
  3. 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.

Henrik Larsson Feb 24, 2026 5:18 PM

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?