mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-16 21:34:25 +03:00
21 lines
695 B
Smarty
21 lines
695 B
Smarty
{**
|
||
* Подключение шаблона топика определенного типа
|
||
*
|
||
* @param object $topic
|
||
* @param boolean $isPreview
|
||
*}
|
||
|
||
{$topic = $smarty.local.topic}
|
||
{$type = $topic->getType()}
|
||
|
||
{if $LS->Topic_IsAllowTopicType( $type )}
|
||
{$template = "./topic.type.{$type}.tpl"}
|
||
|
||
{* Если для указанного типа существует шаблон, то подключаем его *}
|
||
{* Иначе подключаем дефолтный шаблон топика *}
|
||
{if ! $LS->Viewer_TemplateExists( $template )}
|
||
{$template = './topic.tpl'}
|
||
{/if}
|
||
|
||
{include "$template" topic=$topic isList=$smarty.local.isList isPreview=$smarty.local.isPreview}
|
||
{/if} |