I had a rather interesting question the other day about hiding unwanted types of search form the Cireson Portals page search feature located at the top of the Cireson Portal.
The user was trying to remove the option for Knowledge Management as they are not currently using it within their environment.
At first the solution seems easy and that is to find the element in CSS and set it to hidden for that Index.
However, as it turns out, the list items are generate at build time and depending on if you are an analyst or an end user the index value of the list item will change. Hiding Knowledge Management for Analysts hides Service Catalog for End Users or hiding Knowledge Management for End Users hides Work Items for analysts.
So how do we fix this with CSS?
Answer? We don’t….. We use Java Script instead.
By copying the following code in to the Custom.js file located int he Custom Space of the Cireson portal (Default location: C:\inetpub\CiresonPortal\CustomSpace)
/* Hide knowledge articles from all users, based on static “Knowledge Base” text. */
This code looks for the dropdown menu that contains a list item labeled “Knowledge Base” it will hide the list item.
By changing out the text in bold with the list name you wish to hide (Work Items or Request Offerings) you can hide these menu items too.
The end result, the search item list no longer has Knowledge Base available to search on.