forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: How do tabs.xml and site.xml interact?
Date Sat, 08 Feb 2003 01:33:15 GMT
On Fri, Feb 07, 2003 at 04:53:31PM +0100, Ed Steenhoek wrote:
> Hi,
> 
> I'm trying to get into the habits of Forrest as an "end-user". Just a 
> 
> few days back I started using the 0.3 release that now has site.xml 
> for managing the sitemap.
> 
> What I haven't been able to find is some words about the way tabs.xml 
> 
> and site.xml interact.
> My first efforts lead to a navigation tree on the HOME tab that 
> contains the full sitemap. I would like to get to a solution where 
> the other tabs are not shown on the home tab. Is this something that 
> should be possible already in 0.3?

No, that's never a use-case we've encountered.  Why wouldn't you want
some tabs?  Tabs are meant to be like tabs in a book: little indentations
or sticking-out bits that allow you to quickly jump to a page.

> How does the engine knows which tab to link to which element in 
> site.xml? By element name?

All the tabs are always present.  The only thing to decide is which tab
is 'selected'.

Determining which is selected is done by examining the path of the
current page, and selecting the "most specific" tab.  For example, if the
current page is 'community/index.html', and our tabs.xml contains:

    <tab label="Home" dir=""/>
    <tab label="Community" dir="community"/>
    <tab label="How-Tos" dir="community/howto"/>

Then "Home" and "Community" will match (their prefixes match that of the
path), and "Community" will be the selected tab, as "community" is more
specific than "".

Usually, tabs are made to subdirectories, but it's also possible to tab a
single page, eg:

    <tab label="Community FAQ" path="community/faq.html"/>

> I saw an example on the Forrest site where a tab showed only that 
> part of the sitemap relevant to that tab. Is this a goal ore already 
> reality for the current release?

It's a reality in CVS, and looks like it will be in Forrest 0.3.1.  For
example, see the truncated menu at:

http://forrestbot.cocoondev.org/sites/xml-forrest/community/


--Jeff


> I hope some of you can shine a sparkle of light on this by some 
> explanation or some words on the Forrest site that I apparently 
> overlook.
> 
> Thanks.
> 
> Kind regards,
> 
> Ed Steenhoek
> 
> 

Mime
View raw message