mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-08 01:14:24 +03:00
20 lines
556 B
Smarty
20 lines
556 B
Smarty
{**
|
|
* Подключение шаблона топика определенного типа
|
|
*
|
|
* @param object $topic
|
|
* @param boolean $isPreview
|
|
*}
|
|
|
|
{component_define_params params=[ 'topic', 'isPreview', 'isList', 'mods', 'classes', 'attributes' ]}
|
|
|
|
{$type = $topic->getType()}
|
|
|
|
{if $LS->Topic_IsAllowTopicType($type)}
|
|
{$template = $LS->Component_GetTemplatePath('topic', "topic-type-{$type}")}
|
|
|
|
{if $template}
|
|
{component "topic.topic-type-$type" params=$params}
|
|
{else}
|
|
{component 'topic' params=$params}
|
|
{/if}
|
|
{/if} |