Check if content collection is empty

How do I check if a content a collection has (no) children (is empty)?

Hello Tom

Here a fusion example from one of our projects:

content = Neos.Neos:ContentCollection {
    @if.hasContent = ${q(node).find('variants').children().count() > 0}
    nodePath = 'variants'
}

Best regards,
Peter

2 Likes