I have created a field in my Blueprints with cute statistics about the page:
Among other things, it shows whether subpages are included. If yes, these are counted (works!). If no, “keine” should appear. However, only a zero is displayed and the default value is ignored. The error is in the details, but unfortunately I do not see it.
Blueprint:
label: 'Statistik für "{{ page.title.value ?? page.slug }}"'
type: info
text: |
- **Änderungsdatum:** {{ page.modified('d.m.Y') }} | {{ page.modified('H:i') }} Uhr
- **Blueprint:** {{ page.intendedTemplate }}.yml **Template:** {{ page.template }}.php
- **übergeordnete Seite:** {{ page.parent ? page.parent.title : 'keine' }}
- **enthält ** {{ (page.hasChildren && page.hasDrafts) ? page.children.add(page.drafts).count : 'keine' }} Unterseiten
- **hochgeladene Fotos:** {{ page.images.isNotEmpty ? page.images.count : 'keine' }}
theme: positive
