This project is read-only.

Menu Widget

Aug 11, 2008 at 5:15 PM
Edited Aug 11, 2008 at 5:16 PM
ive been thinking about the menu widget and I've been asking myself a question.. once a page is created, should it automatically be added to any lists that contain the collection it belongs to?

To answer that, I considered the main concerns when dealing with menus and the different approaches we could take. I came up with essentially two possibilities: a pure menu widget and a list widget.

Pure menu widget
Two approaches that I see for this is either to attach a "menu" flag to the page and when generating the list you check against it or to create a new menu collection for each page group and for each page that is added to that category, we check each menu collection instance and if the page group belongs to it, we add the newly created page.

I think the former is weak in terms of flexibility and although the latter is a little stronger, but I think it may be chaotic to control in terms of programming and scalability.

Generic list widget
The alternative is a generic list widget that can be used for everything from menus to blog rolls. Rather than relying on the system to determine which page should belong to which list, we put it in the hands of the user. They start off by creating a list collection and are capable of adding items to it. When they add an item, they are prompted with options such as "add internal entries", "add external entries", and "add a sub-list." Adding internal entries brings up a list of all page collections with a checkbox beside each collection as well as each page of that collection with its own checkbox. Checking off a collection automatically checks off each page in the collection and from there they can uncheck or check other entries, checking off pages creates a new list item. A list item can contain, but does not require, a link, an image, the li id and class, and maybe text (possibly).

This option does open up a lot of flexibility but adds the burdon of maintinability for the user. For each page they add - they will have to go back and add a new entry to each menu they want it to appear on.