[dokuwiki] Autogenerated indexmenu with some extra configuration options

  • From: Gunther <dokuwiki@xxxxxxxxxxxxxx>
  • To: Dokuwiki Mailingliste <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 16 Jan 2007 13:38:58 +0100

Hello list!

I wanted to write another indexmenu plugin, because the two existing ones didn't fit to my needs. One of the reasons is, that my project is in German and therefor you have to deal with "Umlaute" (you know these letters like 'ä', 'ö'). So it's not a good ideas to simply use the pagenames. And also using the "First Heading" Option is not ideal, because headings are often too long for an entry in a navigation menu.

For the old DW Version (2006-03-09) I wrote a plugin with which you could set an entry on every page like <navmenutitle>your title here</navmenutitle>. In the meanwhile I'm thinking about using the metadata title field for this. With Esther Brunners plugin you can set metadata on every page, so you will be able to use it for the menu. As a sideeffect the normal index function of DW will use it also when the first heading option is chosen.

Are there any sideeffects or drawbacks with this method?

Another question is how to gether the required informations? I use a permanent 2-col layout where the menu is located at the side column. So in general there's no need for generating the menu on every page request. It could be cached and needed only beeing rebuild if some of the following actions took place:

   * Metadata title has changed
   * New page was created
   * A page was deleted
   * A page has moved (via plugin)
   * /forgot one???/

/
/The second thing is the sortorder of the menu entries. Very often (only) an alphabetical sortorder is not ideal. For this reason there should be an easy way to achieve a manual override for this. I thought about sortorder numbers (as extra metadata?). For namespaces for example in steps of 10 and for pages in steps of 100.

So there always has to be an automatic behaviour when information is missing - but there should be an easy way to override it!

Is there a better (saver, better performance, less drawbacks, and so on) way to achieve this goals?
How would you try to solve the problem?

Help would be very much appreciated!

Greetings
Gunther

PS: German is my native language ;-)  - so please excuse my bad English!

Other related posts: