In service portal I have to create custom breadcrumbs for multiple custom pages how to do it?

archu
Tera Contributor

In service portal I have to create custom breadcrumbs for multiple custom pages how to do it?

I have multiple pages like page1 page2 page3 etc when i use bredcrum it should navigate to my custom page

2 REPLIES 2

nathanfirth
Tera Guru

You need to broadcast an event from the a widget on the page that tells the breadcrumbs widget the structure it should use.



See the below example:



function ($scope, $rootScope) {



$scope.data.bc = [];


$scope.data.bc.push({


        label: "Grandparent",


        url: '#'


});


$scope.data.bc.push({


        label: "Parent",


        url: '#'


});


$scope.data.bc.push({


        label: "Child",


        url: '#'


});



$rootScope.$broadcast('sp.update.breadcrumbs', $scope.data.bc);


}


Hi Nathan,



Could you tell me where exactly on the child page you would put this? I'm having the same issue where I've created some custom pages and I want to link one to another so the breadcrumbs widget will see the proper path. Right now the widget sees no relationship and only displays Home > Page.