SnTT: Sectioned XPages Menu
To make this I created a new custom control and called it ccSectionSideMenu. This very closely resembles the ccSideMenu custom control within the XPages Framework.
Now, to support the computed field in the code above, I had to make some changes to the xpUtil Server Javascript script libaray. These are the 2 functions I added:
And I modified the createFromProperties function and just added this code in between Side Bar and Footer Column blocks:
I really can't take a lot of credit for all the Javascript code I listed above. This code was just adapted from other functions and code blocks already in that script library. So I guess Steve Castledine and/or Niklas Heidloff wrote this code and really deserve the credit as all I did was re-task it to meet my needs. But the last piece of this puzzle is the layout.properties file. I added the following:
#Side Bar Menu Sections
sideBarSectionMenu.title=Section1,Section2
sideBarSectionMenu.link=Section1.xsp,Section2.xsp
sideBarSectionMenu1.title=subMenu1.1,subMenu1.2,subMenu1.3
sideBarSectionMenu1.link=subMenu1-1.xsp,subMenu1-2.xsp,subMenu1-3.xsp
sideBarSectionMenu2.title=subMenu2.1,subMenu2.2,subMenu2.3
sideBarSectionMenu2.link=subMenu2-1.xsp,subMenu2-2.xsp,subMenu2-3.xsp
This just sets up the data to be parsed and turned into the sectioned menu and follows the same format as the footer columns section.
Here's what you end up with:

And that's it, hopefully you'll get some mileage out of this. I didn't have time to give it twisty support where the menus collapse when you close the section, but I do plan on adding that in the future when time permits or the absolute need arises. But as long as you don't have a ton of menu items to display this actually works really well. Enjoy!










