1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-08 01:14:24 +03:00
ifhub.club/application/frontend/components/topic/topic-type.tpl

20 lines
556 B
Smarty
Raw Normal View History

2014-07-28 19:55:18 +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}