<li data-item="category" id="{{ category.id }}">

    {% include '@VlabsCms/Admin/Category/heading.html.twig' %}

    {% if category.posts|length %}
        <ul style="margin-left: 30px; margin-top: 10px" data-sort="post">
            {% for post in category.posts %}
                {% include '@VlabsCms/Admin/Post/show.html.twig' %}
            {% endfor %}
        </ul>
    {% endif %}

    {% if category.children|length %}
        <ul style="margin-left: 30px; margin-top: 10px" data-sort="category">
            {% for category in category.children %}
                {% include '@VlabsCms/Admin/Category/show.html.twig' %}
            {% endfor %}
        </ul>
    {% endif %}

</li>