Refer to system property in widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018 10:06 AM
Hi,
We have multiple service portals that we have to link to from our main service portal page. We have the baseline breadcrumbs widget on most of our pages, however, when a user goes into one of the other service portals, when they click on Home in the breadcrumbs widget, I want it to take them to our main service portal, not the portal they are in. I discussed this with SN at Knowledge and they suggested cloning the breadcrumbs widget and changing the Home link in the cloned widget to refer to our main service portal.
I have cloned the breadcrumbs widget and hardcoded the main service portal in the html section. I have added it to the page that the other portals are referring to and everything is working as expected.
We prefer not to hardcode anything though... I thought it might be better to create a system property that contains the main portal home page and then refer to that system property in the widget. Does this really buy me anything though? At the end of the day, the page is hardcoded somewhere... in the widget or in the property. Is best practice to refer to the system property in the widget and how much extra coding effort is that going to add for me (I am new to modifying widgets and our companies direction is typically to stick to baseline as much as possible).
Thanks for any input / advice!
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018 10:21 AM
There are many ways to solve this. You certainly could pull in a System Property, for this, I believe you can just use gs.getProperty("property.name") method.
Another option would be to pull the main portal based on the "default" checkbox on the portal record. That way you can have multiple portals and themes, but the breadcrumbs home will link to the portal marked as default.
Like I said, there are a ton of ways to accomplish what you're looking for. Also, keep in mind that you can also manipulate the results of the breadcrumbs using angular events.
Hope that helps,
You can check out some of my tutorials and docs on service portal at http://serviceportal.io
-----------------
Nathan Firth
Founder and ServiceNow Architect
NewRocket, Inc.
nathan.firth@newrocket.com
http://serviceportal.io
http://newrocket.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018 01:57 PM
Ok thank you! I will check out your site as breadcrumbs is proving to be the last challenge before we release our beta portal.
PS... Building a better service portal: lessons from the field was one of my favorite Knowledge18 sessions... thank you! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018 02:06 PM
Oh, awesome! Thank you for the kind words and for attending our session!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2021 04:33 AM
There is a lot of ways to solve this. But the best way will be to ask for the help of a specialist. I know a good company who have houses and lots for sale. Maybe you are interested in this, and it will help to solve your problems. Don't hesitate to navigate through their site if you want to do it on your read more information about it or watch some videos explaining the process. Good luck, I hope all will be alright 🙂