Adding custom navigation

To add your own navigation capability, create a Lightning Component that extends forceCommunity:navigationMenuBase. The code snippet to get started is given in the following code. Note that {!v.menuItems} automatically adds the menuItems, which was configured in the navigation menu by the community admin. Take a look at this code block:

<aura:component extends="forceCommunity:navigationMenuBase">   <div class="slds-grid slds-grid--vertical slds-navigation-list--vertical">       <ul onclick="{!c.onClick}">           <aura:iteration items="{!v.menuItems}" var="item">               <li class="{!item.active ? 'slds-is-active' : ''}"> <a href="javascript:void(0);" data-menu-item-id="{!item.id}" class="slds-navigation-list--vertical__action slds-text-link--reset"> ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.