Skip to content

Conversation

@heidkaemper
Copy link
Contributor

This PR relates to #11080

Sometimes it would be helpful to conditionally render a field when the page is part of a structure and has / has not children.

if:
  children: 'not empty'

Or even something like this:

if:
  children: 'contains c534de98-24c8-479b-b1a0-0e8945b76020'

By the way, this PR started with the need for a has-children field condition. But I switched to children because I think it's a bit more flexible.

@jasonvarga jasonvarga merged commit 36c3b22 into statamic:5.x Jan 22, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants