<?php
class Path_To_Route_Prefix_Index implements XenForo_Route_Interface
{
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
$action = $router->resolveActionWithIntegerParam($routePath, $request, 'template_id');
$routeMatch = $router->getRouteMatch('Path_To_ControllerPublic_Index', $action, 'tabname', $routePath);
return $routeMatch;
}
}
Oosp!I was talking about the code that adds the tab in the navigation menu, not the router.
<?php
class Path_to_Listeners_Navigation
{
public static function navtabs(array &$extraTabs, $selectedTabId)
{
$extraTabs['tabname'] = array(
'title' => 'Name',
'href' => 'name/',
'selected' => ($selectedTabId == 'newsticker'),
'linksTemplate' => 'my_temp_Navtabs',
);
}
}
<ul class="secondaryContent blockLinksList">
<li><a href="{xen:link pageofit/}">Title</a></li>
</ul>
public static function navtabs(array &$extraTabs, $selectedTabId)
{
if (XenForo_Visitor::getInstance()->hasPermission(permissionGroup', 'permissionName'))
{
$extraTabs['tabname'] = array(
'title' => 'Name',
'href' => 'name/',
'selected' => ($selectedTabId == 'newsticker'),
'linksTemplate' => 'my_temp_Navtabs',
);
}
}
Awesome.PHP:public static function navtabs(array &$extraTabs, $selectedTabId) { if (XenForo_Visitor::getInstance()->hasPermission(permissionGroup', 'permissionName')) { $extraTabs['tabname'] = array( 'title' => 'Name', 'href' => 'name/', 'selected' => ($selectedTabId == 'newsticker'), 'linksTemplate' => 'my_temp_Navtabs', ); } }
'href' => 'name/'
'href' => XenForo_Link::buildPublicLink('name')
Awesome.
Worked.
Thanks
We use essential cookies to make this site work, and optional cookies to enhance your experience.