File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,14 @@ var path = window.location.pathname.split('/');
66var cleanedPath = $ . grep ( path , function ( n ) { return ( n ) } ) ;
77
88// the second to last path segment is the section
9- switch ( cleanedPath [ cleanedPath . length - 2 ] ) {
9+ // unless there's only 1 segment
10+ if ( cleanedPath . length == 1 ) {
11+ path = cleanedPath [ 0 ] ;
12+ } else {
13+ path = cleanedPath [ cleanedPath . length - 2 ] ;
14+ }
15+
16+ switch ( path ) {
1017 case 'understanding_deis' :
1118 $ ( '.toctree-l1 > a:contains("Understanding Deis")' ) . attr ( 'state' , 'open' ) ;
1219 break ;
@@ -19,6 +26,9 @@ switch(cleanedPath[cleanedPath.length-2]) {
1926 case 'managing_deis' :
2027 $ ( '.toctree-l1 > a:contains("Managing Deis")' ) . attr ( 'state' , 'open' ) ;
2128 break ;
29+ case 'troubleshooting_deis' :
30+ $ ( '.toctree-l1 > a:contains("Troubleshooting Deis")' ) . attr ( 'state' , 'open' ) ;
31+ break ;
2232 case 'customizing_deis' :
2333 $ ( '.toctree-l1 > a:contains("Customizing Deis")' ) . attr ( 'state' , 'open' ) ;
2434 break ;
You can’t perform that action at this time.
0 commit comments