Weblog
9/3: Dynamic Menus
OK I've been meaning to post this for a while but didn't manage it over the last two Thursdays. Anyway, better late than never ...
A couple of months ago, one of my clients wanted me to sit in on a meeting where they were going to buy some (3rd party non-Domino) Content Management software to host a new intranet for their Quality Processes. They had a whole bunch of Visio flowcharts and wanted to host them as web pages using the "Save as Web Page" option within Visio. To cut a boring story short, we decided to use Lotus Notes/Domino and not to buy the CMS. I got to design the website.
I needed to design something that was extremely easy for the users to use and where they didn't have to worry about keeping menus up to date as well as pages. The menus had to work dynamically from the pages a bit like the ProjectDX software that I'm using for this blog.
I decided to use Javascript Menus from Milonic because I'd used them before, they work great and they are great value.
However, for them to work in this context, the javascript code for the menus themselves would have to be dynamically created from the domino documents that made up the content of the site. As usual the power and flexibility of Lotus Notes/Domino came to the rescue and I was able to design a view categorised on the menu name and used an @DBLookup to pull the javascript into the web pages.
Hard to explain succinctly so here's a link to a brief demo. The demo shows the dynamic menus in operation with two different menu styles. Each of the menu options comes from a domino document.
You can download a copy of the demo database from here. Rather than explain how it works, check out the design. If anything is unclear, let me know and I'll gladly clarify.
When you download Milonic menus from the Milonic site, the download will include four javascript files. One of these files menu_data.js is the script that will be pulled from the domino view. Code snippets from this file are required in a Menu Style document. Within the Admin section of the database is an import option to pull all the required data from the downloaded files into the database. It will create the Menu Style document automatically. You will need to use this option at least once because the Milonic supplied javascript files haven't been included in the demo. I would prefer you download them yourself after reading the licence terms from the Milonic site.
I hope these are useful to someone. If so, please let me know!
