forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferdinand Soethe <ferdin...@apache.org>
Subject Re: site.xml and tabs.xml
Date Thu, 09 Mar 2006 06:29:47 GMT

>> Forrest has a lack. Only one set of menu items will
>> be displayed,

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.

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.

>> that is the group that contains the
>> current URL. All other menu groups are closed.

True. Only this group will be displayed in an expanded way.
Although there may be more than one open menu (read on).

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

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.

--
Ferdinand Soethe


Mime
View raw message