Dashboards & Visualizations

How to get custom name in Navigation Menu

samsplunkd
Path Finder

Hi,

I have the following navigation menu in my default.xml. Is there a way I can enter the label for my first view "myview". I don't want it to pick the label defined in "myview.xml" definition but I would like to have different name defined in default.xml for "myview" so that, that name appears in the menu, not the one mentioned in default.xml.

Any help is greatly appreciated.

sideview
SplunkTrust
SplunkTrust

There's a quirk of the navigation menu system that you can exploit, whereby you can put certain HTML into default.xml and it'll get carried along all the way to the rendering and get rendered out into the menu HTML. In particular you can put anchor tags like so:

<a href="myview">Custom Label to myView</a>

and it will become a link in the menu at that spot. the menu system has no idea you did this though, so it will still render the normal link out to the menu system as well. The solution then is to put isVisible="False", which tells the navigation not to render the normal link at all. The other more manual solution is to just not have an "unclassified" node in the navigation at all and instead explicitly specify all of the viewnames.

kasu_praveen
Communicator

Nick,

I tried adding HTML5 data attributes to above "a" tag, but HTML DOM structure was not showing those custom attributes. Any idea how to add custom attributes to navigation links?

History: I have around 10 navigation links in my app. I would like to prefix a specific text(Ex:"DOMAIN")before some of the navigation links. I was thinking only way to identify those few links in JavaScript is with links having special attribute.

Please refer below - I tried to add "class" attribute,but didn't worked out.
Ref: http://splunk-base.splunk.com/answers/90946/how-to-add-css-class-to-navigation-menu

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...