forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brondsema <d...@brondsema.net>
Subject Re: tabs.xml into site.xml
Date Wed, 14 Jan 2004 01:49:20 GMT
Quoting Ross Gardler <rgardler@apache.org>:

> 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.
> 

Makes sense.  (but see later, I don't think the structures meld well)

> 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).

I think for most people (at least for me), their sites have a tab corresponding
to each top-level node.  So this as the default would make sense.

> 
> 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?

This wouldn't allow for a tab to have an href to a external page.  It also
wouldn't allow for ordering and I'm not sure how subtabs would work.

The current xml structure used in tabs.xml makes sense; I don't think it would
integrate with the site.xml structure very well.

My thoughts overall: keep tabs.xml since it is serving it's purpose well (and
backwards compatibility).  The only functionality that I think we should add is
 default tabs (no tabs.xml file) that take each top-level node of the site.xml

> 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?

Or, we could get rid of @tab and @id (and use @href instead of @dir too) and
determine if a given page is part of a tab section (i.e. the tab needs to be
highlighted) with url matching.  Example:

  <tab label="Foobar Docs" href="foobar/docs"/>

A file like foobar/docs/faq.html would succesfully match against the href and so
the "Foobar Docs" tab would be highlighted.


> 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.
> 

site.xml doesn't have a schema.  It is (for better or worse) very free-form.


-- 
Dave Brondsema 
dave@brondsema.net 
http://www.brondsema.net - personal 
http://www.splike.com - programming 
http://csx.calvin.edu - student org 

Mime
View raw message