betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

24 October 2006

Automatic Menus on the Nautica Project

The easiest CMS on Zope just got easier
 

Yesterday evening I spent some "quality time" online with sm (this morning for him) to improve further on the ZWiki Nautica Project. In case you missed that, it's a site that skins a ZWiki in a good looking template from http://www.openwebdesign.org/, thereby trying to prove the point that a ZWiki is really the easiest CMS on Zope. There still are some things missing, but we improved a lot on how the menu is done...


The template we chose has those four big menu points with subtitles, right under a big decorative image. This is appropriate for a small company site or so, but for a wiki it poses the question: Where do those links (and their text) get set. My first rough setup had those links in a static HTML file. Not a nice setup, since in the "small company" example you can't be certain that we have someone confident enough to do raw html editing when the "offer of the month" changes. A more wiki-like approach was needed and sm found one.

What we do now is generate the menu from the subtopics of the wiki's start page. We limit that to only the first four (using pythons min(xy, 4) construct), apply some zwiki API magic to it to get a list of objects (happy to have had sm's help at that point), and then use the summary() function to get the subtitles. The summary() function basically takes the first paragraph of a page and cuts it down if it is too long. Our pages get nice headlines that are now reflected in the subtitles of the menu, something that is a Good Thing(TM), as it gives continuity to the visitor. As this is all inside a wiki, the documentation was updated right after the code.

Next step will probably be to bring the wiki administration pages into some shape, either right inside the styling of the template, or in something that references the design a bit.

Posted by betabug at 09:22 | Comments (0) | Trackbacks (0)
ch athens
Life in Athens (Greece) for a foreigner from the other side of the mountains. And with an interest in digital life and the feeling of change in a big city. Multilingual English - German - Greek.
Main blog page
Recent Entries
Best of
Some of the most sought after posts, judging from access logs and search engine queries.

Apple & Macintosh:
Security & Privacy:
Misc technical:
Athens for tourists and visitors:
Life in general:
<< Places of Enjoyment in Athens | Main | Long Time No See >>
Comments
There are no comments.
Trackbacks
You can trackback to: http://betabug.ch/blogs/ch-athens/470/tbping
There are no trackbacks.