- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2018 01:36 PM
Hello everyone
I'm trying to change the redirection of 'Service Catalog' in the breadcrumb.
Currently if we click on Service Catalog I see the page is being redirected to the page 'sc_home'. I'm trying to disable this redirection and would like to redirect it to separate page, onClick.
I have cloned the breadcrumbs widget and changed the below line in the HTML code
<a ng-href="{{item.url}}">{{item.label}}</a>
to
I'm defining the href link directly assuming this is what it is triggering the Service Catalog to 'sc_home' page. However even on my change it doesn't work and still redirect to the home page.
Is there any other place changes to be implemented for a successful redirection?
Thanks
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2018 11:20 AM
I finally figured out by restricting the links in breadcrumbs by adding the below lines in HTML template.
<a ng-if="item.label != 'Service Catalog'" ng-href="{{item.url}}">{{item.label}}</a>
<a ng-if="item.label ==='Service Catalog'" ng-href="?id=sc_category&sys_id=e15706fc0a0a0aa7007fc21e1ab70c2f">{{item.label}}</a>
Kind of hard code to 'Service Catalog' label which redirects to above URL and for rest of the links it works as usual.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 07:17 AM
Hello Everyone
Any suggestions or thoughts here please?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 07:34 AM
My concern is, if you replace the instance of breadcrumbs with your cloned one that you will run into issues because that Breadcrumbs widget controls all breadcrumb redirects, not just the Service Catalog redirect. So that <a ng-href="{{item.url}}">{{item.label}}</a> controls all breadcrumb links and changing it for one page/item changes it for every breadcrumb link.
My initial thought is it's pulling those URL's from the SP Header Menu widget (Menu Items in that widget). Of course, those affect the header menu as well on your Service Portal.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 07:40 AM
Thanks for your reply. You have understood the issue perfectly. As now I changed the href URL and have hard coded it, this has effected for every breadcrumb link. For example if I click on Quick Links or Role Delegation on the breadcrumb it takes me to the same page whatever I defined in the href.
Is there anyway I can only restrict the href URL for only 'Service Catalogs' in the breadcrumb and rest other links works same as it should be.
Thanks in advance for any solutions provided.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 07:49 AM
The only way that I think you could do would be with a function of if statement of some sorts in the Client Script or Server Script of the widget. I wouldn't know exactly how or where to write this, but essentially you would want if the item.label is "Service Catalog" then the item.url would be something specific. Basically anytime it sees "Service Catalog" as the label or item in the Breadcrumb list, you assign a specific url to item.url.
Unfortunately coding for that is a little over my head when it comes to the Service Portal.
I don't see a way of doing it outside of that because you can't just make a Service Catalog Breadcrumb widget because it won't look right on the page. You wouldn't be able to include it in the correct position of the normal Breadcrumbs.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven