Saved queries over entries—filter, sort, paginate; use on pages, in Twig, or via the API, with real-world examples.
Overview
Content lists are saved queries over content entries—similar to “views” in other CMSs. Filter by status, taxonomy term, and custom fields; sort and paginate; expose on the site, in Twig, or via the public API.
Prerequisites
Run migration 058_content_lists.sql via composer migrate before using content lists.
Admin path and permissions
Content → Content lists at /admin/content-lists.
Requires the manage_content_types permission (same gate as content type administration).
Creating a content list
- Go to
/admin/content-listsand click New list. - Enter a Name and URL Slug (used in URLs and Twig).
- Pick a Content type — all results come from this type.
- Optional: restrict by Statuses (published, draft, …).
- Optional: filter by a Taxonomy term.
- Add up to three field filters (e.g. score > 4).
- Choose Sort (see below).
- Enable exposure options:
- Public page —
/lists/{slug}?page=2 - REST API —
GET /api/v1/content-lists/{slug} - Or use in themes only (no public page required)
- Public page —
- Save and use Preview to run the query with admin rules.
Field filter operators
| Field type | Operators |
|---|---|
| number | eq, neq, gt, gte, lt, lte |
| text, textarea, select, url | eq, contains |
| boolean | eq |
Sort options
Sort by entry columns:
published_atupdated_atcreated_attitlefield:{field_key}— custom field value
Public storefront page
When Public page is enabled:
- URL:
/lists/{slug}?page=2 - Theme override:
themes/{theme}/views/content_lists/{slug}.twigor fallbackcontent_lists/show.twig - Default template reuses content index card grid styling
Twig: content_list() function
Embed lists in any theme template. Storefront-safe: embeds use published visibility.
{% set pack = content_list('top-reviews', 6) %}
{% for card in pack.entries %}
<a href="/{{ pack.type.slug }}/{{ card.row.slug }}">
{{ card.row.title }}
</a>
{% endfor %}
Arguments: content_list(slug, limit, page). Returns type metadata and entry card rows.
REST API
GET /api/v1/content-lists/{slug}?page=1
Requires an API key with read scope. Response includes list, meta, and data (entry summaries).
Draft statuses in the list definition require read_drafts scope unless the list is configured as published-only.
Preview
From the list edit screen, click Preview. Preview runs the query with admin rules—drafts appear when selected in status filters.
Migration note
Content lists were added in migration 058_content_lists.sql. If the menu item is missing or saves fail, run composer migrate and confirm your CMS version includes content lists support.
Example scenarios
These patterns show what content lists are for in real projects—not just the admin fields.
Homepage “Top reviews” block
Goal: Show the six highest-scoring published reviews on the home page.
- Create list slug
top-reviewsfor content type Review. - Status: Published only.
- Field filter:
scoregte4(number field). - Sort:
field:scoredescending. - In
page/home.twig:{% set pack = content_list('top-reviews', 6) %}and looppack.entriesinto your card partial.
“Latest from Product news” taxonomy strip
Goal: A blog sidebar with only posts in the Product news category.
- List slug
product-news-latest, type Blog. - Taxonomy filter: term Product news.
- Sort:
published_atdescending. - Embed with
content_list('product-news-latest', 5)—no public list page required.
Staff-curated “Featured guides”
Goal: Editors tick a boolean featured on guide entries; marketing displays only those.
- Add boolean field
featuredon the Guide type. - List filter:
featuredeq1. - Enable Public page at
/lists/featured-guidesfor a shareable directory, or keep theme-only.
Partner directory (public list URL)
Goal: A standalone /lists/partners page without custom PHP.
- Type Partner with logo media field and summary text.
- List: published only, sort by
titleascending. - Enable Public page; optional theme override
content_lists/partners.twig.
Mobile app feed via REST
Goal: Same query as the website, consumed by an iOS app.
- Enable REST API on list
homepage-feed. - Create API key with
readscope. - App calls
GET /api/v1/content-lists/homepage-feed?page=1and mapsdatato native cells.
Preview before launch
Goal: Verify filters include drafts during QA.
- Include Draft in status filter temporarily.
- Click Preview on the list edit screen—preview uses admin rules so drafts appear.
- Remove draft status before go-live; storefront embeds always use published visibility.
Troubleshooting
- Empty list on site but entries exist — Check field filters, status filters, and publish dates.
- API 403 — API key lacks
readorread_draftsas needed. - Wrong sort order — Custom field sort requires
field:{key}syntax and a populated field.