forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: tabs.xml into site.xml
Date Wed, 14 Jan 2004 02:07:23 GMT
Dave Brondsema wrote:
> Quoting Ross Gardler <rgardler@apache.org>:
> 
> 
>>Having said that, maybe the tabs.xml generated from site.xml thing can 
>>go in 0.6 since we have introduced two level tabs now. Comments?
>>
> 
> 
> Can you point to a thread where this was discussed?  Why do we want this? How
> would this work?  Recognize a special "tabs" node like we do for "external-refs"?

Well it hasn;t been discussed fully yet, just hinted at by Nicola Ken 
and agreed as a good idea by myself. Obviously with such a change 
discussion should be had first - so lets go...

Here's the original (minimal) thread, not really a discussion, just a 
couple of comments: 
http://marc.theaimsgroup.com/?l=forrest-dev&m=107208737624502&w=2

This may have been discussed previously too

My reasoning for wanting to do this is that site.xml and tabs.xml both 
describe navigation through the site and therefore they should both be 
in the same file.

Nicola Kens original suggestion (in above thread) was:

"My idea was to have top-level nodes of site.xml be the tabs, and a skin
could decide at which level switch from tabs to navigation. As some
pointed out, tabs are not necessarily containers of pages, but links to
pages. Hence they have to remain in a separate hierarchy. This does not
mean though that they have to be in a separate file."

Now I don't claim to know exactly what Nicola Ken was thinking but my 
thinking is that we can create some default behaviour that has top level 
nodes become tabs, and then a defined number of levels below that be 
"sub tabs". How these are displayed is up to the skin. They could even 
be ignored and just have a left menu bar. In my skin I want to get rid 
of the left menu bar and use a two level tab system with a drop down 
menu for the rest (I need the full width of the screen for content).

At the moment we relate sections of site.xml to tabs defined in a 
separate file using the "tab" attribute in site.xml and the "is" 
attibute in the tabs.xml file. Why not just define the tab label in the 
site.xml file?

<docs label="Documentation" dir="docs" indexfile="index.html" tab="Docs">
   ...
</docs>

Would produce a tab labelled "Docs" that links to "docs/index.html".

No value for "tab" means use the same label as for the menu item, so:

<docs label="Documentation" dir="docs" indexfile="index.html">
   ...
</docs>

produces a tab with the label "Documentation", linked to "docs/index.html"

We can also provide something like a "noTab" attribute that indicates 
the menu element should not generate a corresponding tab, so:


<docs label="Documentation" dir="docs" noTab="true">
   ...
</docs>

produces a menu element but no tab.

The big probelm with this approach is that it is not backward 
compatible. We can make it so by creating a new site.xml schema and 
processing in the sitemap appropriately (performance hit). But then I'm 
not sure of any way we can do it and keep backward compatability.

Perhaps Nicola Ken had a different idea when he dropped that innocent 
comment into his mail...

Ross


Mime
View raw message