forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Bolger" <pbol...@gmail.com>
Subject Re: site.xml and tabs.xml
Date Thu, 09 Mar 2006 15:19:42 GMT
> In my view this is a feature and not a 'lack'. Or - to put it
> differently - one of two ways of handling menus. Keeping everything
> open that the user opens is an alternative way of handling menus that
> will soon become a pain because the menu will become quite cluttered.

- But - If you are deviating from the graphically linked tabs and left
nav (like I am) it's not very intuitive to have the section closed
when you first select it. My use case is the display of minutes from
monthly meetings, and it's good to display the current ones by
default.


> Also, as far as Forrest is concerned, it will increase the likelyhood
> that (in larger menus) the selected menu item is in a part of the menu
> that requires scrolling to become visible.

So, the ability to control which groups are open is important.


> Careful about conclusions about behavior drawn from quick examples.
> Ime Forrest menus is far to complex to reliably do that.

Being wrong is almost as good as being right though, isn't it?

Seriously though, it seems like Forrest menus could be better explained.


> Talking about your example, here are the complete files I have created
> from your example:
>
> site.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
>     <menugroup tab="tabone">
>         <childone label="childone" >
>             <childone href="index.html" label="childonelabel" />
>         </childone >
>         <childtwo label="childtwo">
>             <childtwo href="index.html"  label="" />
>         </childtwo>
>     </menugroup>
>     <childthree label="childthree" tab="tabone">
>         <childthree href="index.html" label="childthreelabel" />
>     </childthree>
> </site>
>
> tabs.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.1//EN" "http://forrest.apache.org/dtd/tab-cocoon-v11.dtd">
> <tabs software="MyProj"
>   title="MyProj"
>   copyright="Foo"
>   xmlns:xlink="http://www.w3.org/1999/xlink">
>     <tab id="tabone" label="tabone" dir="" />
> </tabs>
>
> > Childthree would display the root label, 'childthree', only.
>
> True. Main reason being that
>
> - childthree is the only labeled and thus
>   visible group that is associated with tabone.
> - there is a reference to index.html in that group so Forrest will
>   open that group deep enough to display that menu-item.
>
> If you now put a label to menugroup
>
> site.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
>     <menugroup label="menugroup" tab="tabone">
>         <childone label="childone" >
>             <childone href="index.html" label="childonelabel" />
>         </childone >
>         <childtwo label="childtwo">
>             <childtwo href="index.html"  label="" />
>         </childtwo>
>     </menugroup>
>     <childthree label="childthree" tab="tabone">
>         <childthree href="index.html" label="childthreelabel" />
>     </childthree>
> </site>
>
> you would actually see all three
> childgroups open because they all contain a reference to the same
> index.html (because you have the same filename (index.htm) and no
> directory (href) in the menu parents)!
>
> A bit weird is the display of index in childtwo (a
> line below the menu), but that probably has to do with the missing
> label for the reference to index.html.
>
> >  It seems that any menu groups which are within the menu group root
> > element will open when the tab is selected as long as they have a
> > label attribute. The following would seem to show all the items form
> > childone and childtwo and the index.hml from childone.
>
> Imo this is the wrong conclusion. Only those will open that contain a
> reference to the currently open file.
>
Ok, it'd be really good to get this documented in a way which was
reasonably easy to understand.  I'm getting the empty labels to force
menus to open. still not clear on the differences between href"" and
dir"" and on which attributes are applicable at which level. It'd also
be interesting to work out how to specify output directories ----
analogue background: I think in ins and outs, Cocoon's logic seems
like quantum mechanics to me.
Might experiment a bit more and put up more theories which can be shot down ~~~;

Mime
View raw message