Navbar custom links

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gribs
    Senior Member
    • May 2015
    • 104

    Navbar custom links

    Hi
    I have make custom links in client/res/templates/site/navbar.tpl

    after
    {{#each tabListDefs}} <li data-name="{{name}}"><a href="{{link}}" class="nav-link"><span class="full-label">{{label}}</span><span class="short-label" title="{{label}}">{{shortLabel}}</span></a></li> {{/each}} like this
    <li data-name="Custom link"><a href="#CustomLink">Custom link</a></li>
    it works, but I want to hide these custom links from portal users, could you help me to do that please?
  • yuri
    Member
    • Mar 2014
    • 8627

    #2
    pass isPortal in data function

    var isPortal = !!this.getUser().get('portalId')

    then you can use statement:
    {{#unless isPortal}}
    YOUR HTML HERE
    {{/unless}}
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • gribs
      Senior Member
      • May 2015
      • 104

      #3
      Thank you for the information!

      Comment

      • c.binder
        Junior Member
        • Apr 2016
        • 5

        #4
        How can I add such a custom link to the tabList so that it's available in Administration --> User Interface --> Tab List? (like all other "core" links)

        Comment

        Working...