Blog Sections Open

Filtering Wayfinder Output with a Custom Condition Instead of Guessing at `&where`

Wayfinder does not always behave like a generic record query builder, so menu filtering often works better through explicit preprocessing than guessed where syntax.

Trying to pass a database-style condition directly into Wayfinder often leads to empty output, especially when the data you want to filter by lives in TVs or in values Wayfinder does not query the way you expect.

What to do instead

  • build the candidate resource list first and pass it into the menu call
  • use a helper snippet to resolve which resource IDs match the condition
  • keep Wayfinder focused on rendering the menu, not on discovering business logic filters

This separation usually makes the template code clearer and avoids the trap of treating Wayfinder like a universal ORM-style query tool.

Newer post

Debugging Shopkeeper Order Submission When eForm Mail Hooks Cause a White Screen

What to check when Shopkeeper order email hooks break the request and the checkout form ends on a blank page.

Older post

Getting the Number of EvoGallery Images for Each Resource in DocLister

A practical approach for showing per-resource EvoGallery image counts inside a DocLister listing.