{% extends 'master.twig' %} {% from 'macros.twig' import news_post %} {% set title = 'News' %} {% set posts = category.posts|batch(3) %} {% set paginationPages = posts|keys %} {% set paginationUrl %}{{ route('news.category', category.name) }}{% endset %} {% block content %}
News
{% for post in posts[get.page|default(1) - 1] %} {{ news_post(post.id, post.text, post.created, post.userData, post.title, post.commentCount) }} {% endfor %} {% if posts|length > 1 %}
{% include 'elements/pagination.twig' %}
{% endif %}
{% endblock %}