{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace ot=Opentalent\OtTemplating\ViewHelpers}

<f:comment><!-- Next news --></f:comment>

<f:comment><!-- Get the news page' uid if the page is found --></f:comment>
<v:variable.set value="{ot:newsPage.getId()}" name="newsPageUid"/>

<f:if condition="{newsPageUid} > 0">
    <section class="mt-50 news">
        <div class="container">
            <div class="row">

                <div class="col-lg-12 col-md-12">
                    <div class="text-center">
                        <h2><f:translate key="latest-news"/></h2>
                    </div>
                </div>

            <ot:cObject typoscriptObjectPath="lib.tx_ottemplating.widgets.news_latest"
                        settings="{'settings.defaultDetailPid': newsPageUid}"/>

            <footer>
                <f:if condition="{newsPageUid} > 0">
                    <div class="col-lg-12 col-md-12">
                        <div class="text-center">
                            <f:link.page pageUid="{newsPageUid}">
                                <f:translate key="see-all-news"/>
                            </f:link.page>
                        </div>
                    </div>
                </f:if>
            </footer>
        </div>
    </div>
</f:if>
