forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Fixing menus
Date Tue, 08 Apr 2003 17:00:00 GMT

Lots of people (including me) find Forrest's menus frustratingly limited.

 - There's an artificial distinction between 'menus' (non-clickable
   titles) and 'menu-items', which are clickable links.  There must be a
   strict interleaving of menus and menu-items.

 - Following on from the above, it isn't possible to say "this node
   should stay closed until I click on it".

These are limitations of the book.xml format (which site.xml generates on
the fly).

So I was thinking, how about we ditch book.xml, and instead use Maven's
navigation.xml format?

<project name="Maven">
      <item name="Home"        href="/index.html"/>
      <item name="Reference"   href="/reference/index.html"/>

    <menu name="Overview">
      <item name="Goals"                   href="/goals.html"/>
      <item name="Features"                href="/features.html"/>
      <item name="Download"                href="/start/download.html"/>
      <item name="News and Status"         href="/status.html"/>
      <item name="Getting Started"         href="/start/index.html" collapse="true">
        <item name="Download"              href="/start/download.html"/>
        <item name="Install"               href="/start/install.html"/>
        <item name="Integrate"             href="/start/integrate.html"/>
        <item name="Use"                   href="/start/use.html"/>
        <item name="Build"                 href="/start/bootstrap.html"/>
        <item name="Anakia Users"          href="/start/anakia.html"/>
      <item name="Reference"               href="/reference/index.html" collapse="true">
        <item name="Project Descriptors"   href="/reference/project-descriptor.html"/>
        <item name="User Guide"            href="/reference/user-guide.html"/>
        <item name="Plugins"               href="/reference/plugins/index.html"/>
        <item name="Developer Guide"       href="/reference/developer-guide.html"/>
        <item name="Project Layout"        href="/reference/dirlayout.html"/>
      <item name="FAQ"                     href="/faq.html"/>
      <item name="Powered By"              href="/powered.html"/>
      <item name="Tasks"                   href="/tasks.html"/>
      <item name="Glossary"                href="/glossary.html"/>

I like it mostly because:

 - there's no menu/menu-item distinction
 - the 'collapse' attribute would let us scratch a major itch of having
   collapsible menus.
 - we move closer to out-the-box support for Maven projects

Things I don't like:

 - there's this <body> tag doing nothing.
 - links with a common prefix (/reference/) must be duplicated.


On this topic, I think we need to draw a distinction between:

1)  the menu "data model", which we should represent by an intermediate
    menu XML format (let's call this menu.xml).
2)  the XML format (book.xml, site.xml, navigation.xml) that the user
    deals with.

So just as faqs, howtos and Docbook are transformed to our intermediate
doc-v11 content format, we'd have site.xml, navigation.xml etc.,
transformed into an intermediate menu.xml format.

This intermediate menu format 1) is transformed directly into a HTML
menu.  We'd have:

User   -->  navigation.xml     --->  menu.xml   --->  HTML

menu.xml is our 'contract' with skin designers, just as site.xml and
friends are our contract with users.  Separating out these two contracts
is nice, because now we can (in theory) have a proliferation of menu

               site.xml                               Fancy DHTML menu
User   -->  navigation.xml     --->  menu.xml   --->  <ul> + CSS menu
               book.xml                               Simple <table> menu

menu.xml isn't publicly visible, and can be verbose and even redundant as



View raw message