- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2015 09:46 AM
I am using CMS to create a custom site and have a need to remove the standard breadcrumbs from the form header (not the list filter) if forms and catalog items. I was successful for the incident form using an onLoad client script, obtaining the element id "form_header" and setting visibility to false. However, I need to do this for all catalog items (several hundred) and I don't want to create a client script of each one. So is there a global way to remove the standard OOTB breadcrumbs?
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015 11:23 AM
To avoid creating a client script for each catalog item, use a global UI script instead. It will run on every page in the system. You can use location.href to check if current page is "com.glideapp.servicecatalog_cat_item_view" and if it is — hide the DOM element that contains breadcrumbs. Something along these lines:
(function() {
addLoadEvent(function() {
if(location.href.indexOf('/ess/com.glideapp.servicecatalog_cat_item_view.do') != -1 {
gel('your_element_id').hide();
}
});
})();
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015 11:09 AM
Thanks David. I set the property to false but the breadcrumbs still appear. We are running the Dublin release, patch 6 I think. I wonder if this is a Eureka feature? What are you running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015 11:23 AM
To avoid creating a client script for each catalog item, use a global UI script instead. It will run on every page in the system. You can use location.href to check if current page is "com.glideapp.servicecatalog_cat_item_view" and if it is — hide the DOM element that contains breadcrumbs. Something along these lines:
(function() {
addLoadEvent(function() {
if(location.href.indexOf('/ess/com.glideapp.servicecatalog_cat_item_view.do') != -1 {
gel('your_element_id').hide();
}
});
})();
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2015 05:07 PM
Many thanks for this tip, Slava. i had the same requirement of hiding the breadcrumbs on particuler ESS pages, and this did the trick!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2015 03:06 PM
Hi Slava
I am new to UI Script. Since we hide breadcrumbs so in your code, we mentioned 'you_element_id, is that id of breadcrumbs, right? I know how to identify Catalog item form element id, but I had hard time to identify element id for breadcrumbs. If I am wrong, can you give me more information.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2015 08:52 AM
Here's the UI Script I used to hide breadcrumbs:
/***** Hide classic UI Breadcrumbs *****/
// when x = MLDivElement, get element by Id and hide standard breadcrumbs
x=document.getElementById("form_header");
if (x != null && x != "" && x != "undefined" && (typeof x != "undefined")) {
document.getElementById("form_header").style.visibility = "hidden";
}
Kathy Chisefsky
Web Developer
ActioNet, Inc.
20300 Century Boulevard, Suite 200
Germantown, MD 20874
Phone: 301-944-5681