2014-07-28 19:55:18 +03:00
|
|
|
{**
|
|
|
|
* Подключение шаблона топика определенного типа
|
|
|
|
*
|
2014-07-30 13:21:12 +03:00
|
|
|
* @param object $topic
|
|
|
|
* @param boolean $isPreview
|
2014-07-28 19:55:18 +03:00
|
|
|
*}
|
|
|
|
|
2016-04-07 10:10:49 +03:00
|
|
|
{component_define_params params=[ 'topic', 'isPreview', 'isList', 'mods', 'classes', 'attributes' ]}
|
|
|
|
|
2014-07-28 19:55:18 +03:00
|
|
|
{$type = $topic->getType()}
|
|
|
|
|
2016-04-07 10:10:49 +03:00
|
|
|
{if $LS->Topic_IsAllowTopicType($type)}
|
|
|
|
{$template = $LS->Component_GetTemplatePath('topic', "topic-type-{$type}")}
|
2014-07-28 19:55:18 +03:00
|
|
|
|
2016-04-07 10:10:49 +03:00
|
|
|
{if $template}
|
|
|
|
{component "topic.topic-type-$type" params=$params}
|
|
|
|
{else}
|
|
|
|
{component 'topic' params=$params}
|
2015-10-27 11:02:57 +02:00
|
|
|
{/if}
|
2014-07-28 19:55:18 +03:00
|
|
|
{/if}
|