Blog Sections Open
Getting the Number of EvoGallery Images for Each Resource in DocLister
When a listing needs gallery counts per item, you have to query gallery data by resource rather than rely on generic child counters.
If you are rendering a catalog or portfolio with DocLister and want to display how many EvoGallery images belong to each resource, generic counters such as [+total+] are not enough. They count child documents, not gallery files.
The right direction
Attach the count at the listing layer. That usually means either:
- adding a custom
preparefunction that queries EvoGallery data per resource - joining a precomputed count from a gallery-related table or cache
- saving the gallery count into a TV or helper field during gallery updates
The best option depends on scale. For a small portfolio, a lightweight lookup in prepare is fine. For a large catalog, precomputing the count is the safer path.
Filtering Wayfinder Output with a Custom Condition Instead of Guessing at `&where`
How to handle menu filtering in Wayfinder when a simple JSON-style where condition does not behave as expected.
Using the Evolution API in a PHP AJAX Endpoint That Returns JSON
How to bootstrap the Evolution API in a standalone PHP endpoint and return structured JSON to jQuery or another frontend consumer.