0

I am trying to build a lightning component which would generate breadcrumb dynamically in response to a onclick event on the Navigational topic bar, in lightning communities.

enter image description here

I am referring to the guidelines as in the Lightningcomponent library using <aura:iteration>. The problem that I have is, how do I generate the collection variable dynamically.

In this case "myBreadcrumbs" on the click of a tab.

https://developer.salesforce.com/docs/component-library/bundle/lightning:breadcrumb

({
    init: function (cmp, event, helper) {
        **var myBreadcrumbs = [
            {label: 'Account', name: 'objectName' },
            {label: 'Record Name', name: 'record' }
        ];**
        cmp.set('v.myBreadcrumbs', myBreadcrumbs);
    },

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.