I'm quite new to Craft CMS and have takeen over an application (using Twig templates). I'm trying to run a filter but not having much joy so maybe I might get some help!
So, there is a people section (craft.entries.section('people')
) with over 1000 entries. These are displayed in an HTML table, each row has 3 columns (handled using the batch()
call). I want to exclude certain entries that match a particular condition.
For example, I want to exclude all 'people' that partially match a list of names (e.g 'xyz', 'zzzz', 'joebloggs')
{% for people in craft.entries.section('people').order('title asc').limit(500)|batch(3) %}
Is it possible to do a query like this before the loop? Or is it something I need to check on each iteration inside the loop? Doing this might make the batch()
unusable?