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

21 lines
736 B
Smarty
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{**
* Подключение шаблона топика определенного типа
*
* @param object $topic
* @param boolean $isPreview
*}
{$topic = $smarty.local.topic}
{$type = $topic->getType()}
{if $LS->Topic_IsAllowTopicType( $type )}
{$template = $LS->Component_GetTemplatePath('topic', "topic-type-{$type}" )}
{* Если для указанного типа существует шаблон, то подключаем его *}
{* Иначе подключаем дефолтный шаблон топика *}
{if ! $template}
{$template = $LS->Component_GetTemplatePath('topic', 'topic')}
{/if}
{include "$template" topic=$topic isList=$smarty.local.isList isPreview=$smarty.local.isPreview}
{/if}