Jaxel
Well-known member
I have been using template hooks to add top control buttons. It worked great in the past with "threads"; now I am trying to add a top control to a forum... With the thread it worked great, but threads don't have their own top controls. With the forum, its not working at all... I assume its because the forum already has a top control and you can't add a second one? Is it possible to add a second top control?
Code:
<?php
class EWRatendo_Listener_Template
{
public static function template_hook($name, &$contents, array $params, XenForo_Template_Abstract $template)
{
if ($name === 'forum_view_pagenav_before')
{
$contents .= $template->create('EWRatendo_ForumView', $params)->render();
}
}
}
Code:
<xen:topctrl>
<a href="{xen:link 'events/create/{$forum.node_id}'}" class="callToAction">
<span>{xen:phrase post_new_event}</span>
</a>
</xen:topctrl>