Dan
Well-known member
Could we get a content check for the linksTemplates inside the navbar?
We would need this because of following problem:
Inside our portal linkstemplate we're checking permissions
If a user doesn't have permissions for any of this operations, the template will be empty.
But because of following code in the navbar template
XenForo will include the empty linksTemplate and we'll get:
You can reproduce the problem on our demosite: http://demo.extralicense.com/forums/
We would need this because of following problem:
Inside our portal linkstemplate we're checking permissions
Code:
<xen:if hascontent="true">
<ul class="secondaryContent blockLinksList">
<xen:contentcheck>
<xen:if is="{$canManage}">
<li><a href="{xen:link 'portal/manage-categories'}">{xen:phrase simpleportal_manage_categories}</a></li>
<li><a href="{xen:link 'portal/manage-items'}">{xen:phrase simpleportal_manage_items}</a></li>
</xen:if>
<xen:if is="{$canCreate}">
<li><a href="{xen:link 'portal/create-new'}" class="OverlayTrigger">{xen:phrase simpleportal_create_new}</a></li>
</xen:if>
</xen:contentcheck>
</ul>
</xen:if>
If a user doesn't have permissions for any of this operations, the template will be empty.
But because of following code in the navbar template
Code:
<xen:if is="{$extraTab.linksTemplate}">
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">
<a href="{$extraTab.href}" class="navLink">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
<div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} {$extraTabId}TabLinks">
<div class="primaryContent menuHeader">
<h3>{$extraTab.title}</h3>
<div class="muted">{xen:phrase quick_links}</div>
</div>
{xen:raw $extraTab.linksTemplate}
</div>
</li>
You can reproduce the problem on our demosite: http://demo.extralicense.com/forums/
Last edited by a moderator:
Upvote
1