{**
* 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
*}
{*Опция $rootSection: идентификатор объекта, служащего корневым для текущей ветви*}
{assign var="rootSection" value=1}
{* Вывод текста текущего раздела *}
{xs2GetNode NodId=$_THE.PARAMS[0] var="currentSection"}
{if $currentSection.Text}
<b>{$currentSection.NName}</b><br>
{$currentSection.Text}
<hr>
{/if}
{* /Вывод текста текущего раздела *}
{* Вывод списка текстов текущего раздела *}
{xs2GetChildren ParId=$_THE.PARAMS[0] NType="page" var="pages"}
{if $pages|@count > 0}
<b>Тексты в разделе</b><br>
{foreach from=$pages item="page"}
<b>{$page.NName}</b><br>
{$page.Abstract}<br>
<a href="{xs2Href mod="pages" obj="page" met="show" atr=$page.NodId}">читать</a>
<br>
{/foreach}
<hr>
{/if}
{* /Вывод списка текстов текущего раздела *}
{* Вывод пути *}
<b>Путь:</b><br>
{xs2GetPath NodId=$currentSection.NodId rootId=$rootSection var="path"}
{foreach name="pathLoop" from=$path item="node"}
{if $currentSection.NodId != $node.NodId}
<a href="{xs2Href mod="pages" obj="section" met="show" atr=$node.NodId}">
{$node.NName}
</a>
{else}
{$node.NName}
{/if}
{if !$smarty.foreach.pathLoop.last}
|
{/if}
{/foreach}
<hr>
{* /Вывод пути *}
{* Вывод списка дочерних разделов *}
{xs2GetChildren ParId=$currentSection.NodId NType="section" var="childSections"}
{if $childSections|@count > 0}
<b>Подразделы</b><br>
{foreach from=$childSections item="section"}
<a href="{xs2Href mod="pages" obj="section" met="show" atr=$section.NodId}">
{$section.NName}
</a>
<br>
{/foreach}
<hr>
{/if}
{* /Вывод списка дочерних разделов *}
{* Вывод списка разделов-братьев *}
{xs2GetChildren ParId=$currentSection.ParId NType="section" var="siblingSections"}
{if $sections|@count > 0}
<b>Другие разделы</b>
<br>
<b>
<a href="{xs2Href mod="pages" obj="section" met="show" atr=$currentSection.ParId}">
На уровень выше
</a>
</b>
<br>
{foreach from=$sections item="section"}
{if $section.NodId == $currentSection.NodId}
{$section.NName}<br>
{else}
<a href="{xs2Href mod="pages" obj="section" met="show" atr=$section.NodId}">
{$section.NName}
</a>
<br>
{/if}
{/foreach}
{/if}
{* /Вывод списка разделов-братьев *}
|
|