{if !empty($data.id)}{$data.title|escape}{else}[`New topic`]{/if}
{if !$wa->user()->isAuth()}
{sprintf('[`To add new topic please
sign up
or
log in
`]',$wa->signupUrl(),$wa->loginUrl())}
{$wa->authAdapters()} {else}
{if empty($data.id)} {* @event frontend_topic_add.%plugin_id%.top_block *} {foreach $frontend_topic_add as $_}{$_.top_block}{/foreach} {else} {* @event frontend_topic_edit.%plugin_id%.top_block *} {foreach $frontend_topic_edit as $_}{$_.top_block}{/foreach} {/if} {if empty($data.id)} {if count($types) > 1}
{foreach $types as $t}
{hubHelper::getGlyph($t.glyph, 16, false, ['contact' => $user])}{$t.name|default:'[`(no name)`]'|escape}
{/foreach}
{/if}
{/if}
{if !empty($categories)}
[`Category`]
{foreach $categories as $c}
{$c.name|default:'[`(no name)`]'|escape}
{/foreach}
{else}
{/if} {if !empty($errors.content)}
{/if}
{ifset($data.content)|escape}
{if !empty($errors.content)}
{/if}
[`Tags`]
{if !empty($errors.tags)}
{$errors.tags}
{/if}
{if empty($data.id)} {* @event frontend_topic_add.%plugin_id%.bottom_block *} {foreach $frontend_topic_add as $_}{$_.bottom_block}{/foreach} {else} {* @event frontend_topic_edit.%plugin_id%.bottom_block *} {foreach $frontend_topic_edit as $_}{$_.bottom_block}{/foreach} {/if}
{if !empty($preview)}{$preview}{/if}
{if !empty($data.id)}[`Save`]{else}[`Submit topic`]{/if}
{$wa->csrf()}
{/if}