Customize OBIEE HeaderNavBar- Font/Color


As you know its very easy to customize the OBIEE Top Menu bar which is called as Header Navigation Bar (where Home  / Favorites / Catalog and all such custom link exists) . This can be done by changing CSS for classes like .HeaderTitleBarCell, .HeaderNavBarCell and .HeaderMenuBarText span element which is part of common.css file. This is already explained in lot of blogs and easy to do a one custom change to reflect everywhere.

Also we know, using customlinks.xml ([MiddlewareHome]/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1/customlinks.xml ) we can add multiple links in navbar and this is easy too.

Now , what if requirement ask you to change Header Nav bar link appearance differently based on different OBIEE Page or Dashboard you visit ? And what if you want to vanish certain links for specific set of users when they visit specific dashboard pages ?

Here is the solution using simple Javascript:

So here is my existing links:

12-29-2017 11-10-03 AM

And I want to Change the name from Catalog to something else only in specific dashboard page visit .

And it should be looks like below :

12-29-2017 11-17-22 AM

So I have changed font style , color and weight here . To do this add a Text section in corresponding OBIEE page and check HTML Markup and add below code . Also dont forget to add ‘display:none;’ is section properties css section otherwise you might get the expand/collapsible tiny icon.

12-29-2017 11-21-42 AM

<!–script>
var spanElement = document.querySelectorAll(“.HeaderMenuNavBarText span”)[4];
spanElement .innerHTML = ‘<!–font color=”#000000″ face =”Lato” size=”2″ ><!–b> CatalogMenuCustom</b–></font–>’ ;
</script–>

Remove the !- – and – – from all tags above. Also you can use any HTML code here and people might prefer to use the style tag as font tag is deprecated.

Now what I am doing here is searching the corresponding class for Nav Bar menu and looking for span entry 4 (item name :Catalog) which is as per sequence how it appears and overriding the text from ‘Catalog’ to ‘CatalogMenuCustom’

Similarly if you want to remove a certain menu item just find the sequence and use below code instead :

spanElement.innerText = ”;

This will make it a null item there which will make the menu item vanish but bear in mind that it might leave a small tiny space which is still clickable if somebody found it 🙂

This is 11g example but the principle should be same while doing customization in 12c.

 

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s