{**
* XS2:
*
* This file is developed by Solutecs, LLC for the purpose of the company
* and is provided together with XS2 Framework as and inherent part of the
* system. This file can be used on the terms of License Agreement.
*
* +7 (495) 585-0833 / 13 Rusakovskaya street, Moscow 107140 Russia
*
* @link http://www.solutecs.com
* @copyright ©1998-2007 Solutecs, LLC
* @version 1.XX
*}
{* Вывод новости *}
{xs2GetNode NodId=$_THE.PARAMS[0] NType='news' var="currentNews"}
{$currentNews.NName}, {$currentNews.CDate}<br>
{$currentNews.Text}
<br><br>
{* /Вывод новости *}
{* Вывод остальных последних новостей *}
{* Опция $newsCount: сколько последних новостей выводить *}
{assign var="newsCount" value=5}
{*Опция $truncateNews: сколько символов текста новости показывать*}
{assign var="truncateNews" value=150}
{xs2GetNodes NType="news" var="news"}
<b>Другие новости:</b><br>
{section name="newsLoop" loop=$news max=$newsCount}
{if $news[newsLoop].NodId != $currentNews.NodId}
{* Выводим все последние новости, кроме текущей *}
{$news[newsLoop].NName}, {$news[newsLoop].Date}<br>
{$news[newsLoop].Text|truncate:$truncateNews}<br>
<a href="{xs2Href mod="news" obj="news" met="show" atr=$news[newsLoop].NodId}">подробнее</a>
<hr>
{/if}
{/section}
<a href="{xs2Href mod="news" obj="news" met="archive"}">Все новости</a>
{* /Вывод остальных последних новостей *}
|
|