• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Navbar template

Dan

Well-known member
#1
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
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>
XenForo will include the empty linksTemplate and we'll get:
navbarbug.png

You can reproduce the problem on our demosite: http://demo.extralicense.com/forums/
 
Last edited by a moderator: