Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/smarty/templates/news/newsList.tpl
{* Smarty template *}
{loadTopNews assign='newsItems'}
{count array=$newsItems assign='newsItemsCount'}
{if $newsItemsCount > 0}
	<h3>
		{message key="newsItem.archive.title"}
	</h3>
{/if}
{message key='common.button.create' assign='createText'}
{message key='common.button.edit' assign='updateText'}
{message key='common.button.delete' assign='deleteText'}
{buildUrl action='callCreatePage' languageCode=$currentLanguage layout='newsItem' assign='createUri' returnUrl=$localRequestUri}
<ul>
{foreach from=$newsItems item=newsItem}
    <li>
        {buildUrl action='callUpdatePage' assign='updateUri' returnUrl=$localRequestUri id=$newsItem->id}
        {buildUrl action='deletePage' assign='deleteUri' returnUrl=$localRequestUri id=$newsItem->id}
        {if $page->fixed}{assign var='deleteUri' value=''}{/if}
        {contextMenu link_1=$createUri text_1=$createText permId_1='createPage'
                link_2=$updateUri text_2=$updateText permId_2='updatePage'
                link_3=$deleteUri text_3=$deleteText confirm_3=true permId_3='deletePage'
                editModeOnly=true}
            {formatDate date=$newsItem->publication_date|escape}&nbsp;&nbsp;
            {$newsItem->title|escape}&nbsp;&nbsp;
            <a href="{buildUrl identifier=$newsItem->identifier friendly='page' language=$newsItem->language}">
                {message key='newsItem.form.moreInfo'}
            </a>
        {/contextMenu}
        {ifEditMode}
            {include file='context_menu.tpl'}
        {/ifEditMode}
    </li>
{/foreach}
</ul>
{if $newsItemsCount > 0}
    {message key='newsItem.form.archive' assign='btnTitle'}
    {buildUrl friendly='newsArchive' assign='archiveUrl'}
    {button title=$btnTitle url=$archiveUrl class='form_button'}
{/if}
Return current item: Blandware AtLeap Lite - CMS on PHP