Variable Visions

NetSuite Breadcrumb trails

Published Fri. Jan. 04, 2013

The NetSuite keyword, <NLCRUMBTRAIL>, if placed in the Logo and Tabs section of the default theme, displays the current category path. But, just as in other systems, we obviously don’t want to show the breadcrumb trail on the homepage…because it would just say “home”.

Since I have yet to discover a way in NetSuite to alter design layouts with server side conditional statements (NetSuite DOES NOT ALLOW ANY custom jsp…just there own predefined, wrapped, jsp.

<NLCRUMBTRAIL> is really just a wrapper around <%=getCrumbTrail()%>

So, we will have to use javascript to change the css visability, or display as I’ve changed it since display:none/display:block actually hides the breadcrumb container on home, rather than using what NetSuite says by visability: hidden/visability:visable which leaves the container there and empty on home.

This concept seems pretty common place for conditioning in NetSuite land, but I really want to find a server side solution for conditional statements…I’ve wrote if statements in a few different server side languages, but was VERY DISAPPOINTED when I found out NetSuite doesn not allow jsp if statements…they told me what I was doing was not the best way but never offered a real solution…GOLD SUPPORT SUCKS!

The javascript/css show/hide technique works, although since it is happening on the client side, you will notice a slight “jump” before completion.

Basically, make sure <NLCRUMBTRAIL> is in your Logo and Tabs portion of the default theme, but set inline css style to display none or visiablity hidden, and then place the javascript that makes it come back to life in the appropriate Item/Category Template(s). I also placed the javascript in the default item drilldown template so the breadcrumb path shows EVERYWHERE except the homepage (where it isn’t needed).

Keywords:Netsuite breadcrumb trail