Template 'Lawyer' Sidebar Navigation

Hello,

I have a client who is using the ‘Lawyer’ template and I’m trying to figure out how the sidebar navigation menu works on the ‘2 Column Right Sidebar Template’ Content Template? I see that the ‘Static Page Sidebar’ Snippet is called, but in the Snippet, I just see:

<section class="side-block sidebarSubmenuPlaceHolder"></section>

I’m just trying to learn how that sidebar is called in and how it decides which links to show so that I can reply back to my client. I can see that it is calling in the sidebar somehow using JS, but I can’t tell how. We created a new main navigation menu item titled ‘Practice Areas’ and then built a few pages using the Right Sidebar Content Template and placed each of the pages in a new directory named practice-areas. However, the sidebar menu does not appear to show the pages in that directory once we set everything up, so I’m assuming I ‘broke’ something by either changing the page URL’s or putting the pages in a different directory. I’m not well-versed with JS, so I’m wondering if I just needed to change something in there? For now, I just created a new menu under ‘Menus’ and inserted it into the Right Sidebar Content Template, so we have a fix in place. I’m just interested in learning how this was done and how it can be changed in the future because I think the original way is the ‘better’ way to do it and that technique might come in handy for me on existing and future websites.

I appreciate any help you can offer!! Thanks so much!

Hi Ryan,
Love a challenge like this! Looks like the js is calling in the dropdown menu from the main nav activeSelector which I have to admit is pretty cool for keeping templates to a minimum but not great to follow from a code perspective.

If you go to Content > File manager > js > jquery.main.js the function is near the top in line 43 function initSubMenuToSidebar()

However, a wee bit of testing showed that the active state seems to always be on the Static Main Menu li tag irrespective of where you are! Will try to dig deeper in that.

Steve

@twrsj - This is great and definitely gets me a lot closer than I was on my own! I’m with you, I’d really like to figure this out because I have countless sites that have a separate page template to call in each Snippet for a different sidebar. This will come in very handy.

Thank you again for your help here!!

Hello @StudioRTP
Js finds tag li of the first level with class active and clones its internal first tag ul
with all its contents. In addition, the template js has an option to add custom classes.

I see! Thank you so much for the help and explanation here! For some reason my ‘active’ class doesn’t appear to be working, but I’ll dig in to see what’s going on. I’m sure it’s something I screwed up - lol!

Thank you all for the help again, I really do appreciate. I know everyone is busy, so it means a lot!

  • Ryan