1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 07:54:24 +03:00
ifhub.club/application/frontend/components/topic/topic-type.tpl
2016-04-07 14:11:09 +07:00

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}