{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} {/if} {/if} {if !empty($categories)}
[`Category`]
{else}

{/if} {if !empty($errors.content)}
{/if} {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}
{$wa->csrf()}
{/if}