I want to build a news-Feed, like a blog. My problem is that the page.collection is always empty, but I did as all the documentation and examples told me to. I must miss something, but I can not finde my mistake.
My folder structure looks like:
This ist the structure of the blog.md
---
title: News
content:
items: @self.children
limit: 5
order:
by: date
dir: desc
pagination: false
url_taxonomy_filters: false
---
And this is the structure of the blog.html.twig
{% extends 'partials/base.html.twig' %}
{% block content %}
<section id="body-wrapper" class="main style3 primary">
<div class="content container">
**{{ var_dump(count(page.collection)) }}**
<div class="uk-child-width-1-3@m uk-grid-small uk-grid-match" uk-grid>
{% for child in page.collection() %}
<div>
<div class="uk-card uk-card-default">
<div class="uk-card-header">
<div class="uk-grid-small uk-flex-middle" uk-grid>
{% set image = child.media.images|first %}
{% if image %}
<div class="uk-width-auto">
<a href="{{ child.url }}"><img src="" uk-img>{{ image.cropZoom(800,400).html|raw }}</a>
</div>
{% endif %}
<div class="uk-width-expand">
<h3 class="uk-card-title uk-margin-remove-bottom">{{ child.title }}</h3>
<p class="uk-text-meta uk-margin-remove-top"><time datetime="{{ child.date|date("c") }}">{{ child.date|date(system.pages.dateformat.short) }}</time></p>
</div>
</div>
</div>
<div class="uk-card-body">
<p>
{% if child.summary != child.content %}
{{ child.summary|raw }}
{% else %}
{{ child.content|raw }}
{% endif %}
</p>
</div>
<div class="uk-card-footer">
<a href="{{ child.url }}" target="_blank" class="uk-button uk-button-text">Weiterlesen</a>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endblock %}
The {{ var_dump(count(page.collection)) }} shows always int(0).
Has anybody a hint for me?