{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">
    <div class="ot-box ot-last-news">
        <div class="news-list">
            <header>
                <h3><f:translate key="latest-news"/></h3>
            </header>

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

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