<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
      xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"
      data-namespace-typo3-fluid="true">



<f:layout name="{f:if(condition: '{contentObjectData.layout} == 100', then: 'General-Standalone', else: 'General')}" />

<f:section name="hero">
    <h1>{contentObjectData.header}</h1>
</f:section>

<f:section name="content">

    <!--TYPO3SEARCH_end-->
    <f:if condition="{news}">
        <f:then>

            <div class="news-list-view" id="news-container-{contentObjectData.uid}">
                <f:if condition="{settings.hidePagination}">
                    <f:then>
                        <f:for each="{news}" as="newsItem" iteration="iterator">
                            <f:render section="items" arguments="{newsItem:newsItem}"/>
                        </f:for>
                    </f:then>
                    <f:else>
                        <f:if condition="{settings.list.paginate.insertAbove}">
                            <f:render partial="List/Pagination" arguments="{pagination: pagination.pagination, paginator: pagination.paginator}" />
                        </f:if>
                        <f:for each="{pagination.paginator.paginatedItems}" as="newsItem" iteration="iterator">
                            <f:render section="items" arguments="{newsItem:newsItem}"/>
                        </f:for>
                        <f:if condition="{settings.list.paginate.insertBelow}">
                            <f:render partial="List/Pagination" arguments="{pagination: pagination.pagination, paginator: pagination.paginator}" />
                        </f:if>
                    </f:else>
                </f:if>
            </div>
        </f:then>
        <f:else>
            <div class="alert ">
                <f:translate key="list_nonewsfound"/>
            </div>
        </f:else>
    </f:if>
    <!--TYPO3SEARCH_begin-->
</f:section>

<f:section name="items">
    <f:switch expression="{settings.templateLayout}">
        <f:case value="100">
            <f:render partial="List/{f:if(condition: newsItem.isEvent, then:'Event', else:'Item')}-Simplified" arguments="{newsItem: newsItem, settings:settings}"/>
        </f:case>
        <f:defaultCase>
            <f:render partial="List/{f:if(condition: newsItem.isEvent, then:'Event', else:'Item')}" arguments="{newsItem: newsItem, settings:settings}"/>
        </f:defaultCase>
    </f:switch>
</f:section>
</html>
