forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hlshipli...@comcast.net>
Subject RE: Forrest 0.5.1: site.xml, tabs.xml & menus
Date Tue, 01 Jun 2004 18:18:03 GMT
Thanks!  Adding the <index href="index.html"> (for the project, for each of the modules)
solved my
issues.

Double checked http://xml.apache.org/forrest/linking.html and it doesn't mention anything
about
<index> being necessary and magic.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


> -----Original Message-----
> From: Lechique [mailto:lechique@poczta.onet.pl] 
> Sent: Tuesday, June 01, 2004 1:55 PM
> To: Howard M. Lewis Ship
> Subject: Re: Forrest 0.5.1: site.xml, tabs.xml & menus
> 
> 
> 
> Howard M. Lewis Ship wrote:
> 
> 
> 
> > I'm still having trouble with my menu generation. The best I get is
> > that the my index.html files get the complete index (too much, it is
> > selecting all site.xml elements, regardless of the tab attribute).
> > On detail pages, I get the correct menus.
> 
> [cut]
> 
> I'm not any fluent on Forrest generation stuff, but I think that all
> elements of your site should be defined in site.xml. It is also a
> point for 'index.xml' files - that is, files used by tabs. So if there
> is any index.xml, which is not specified in site.xml, Forrest 'thinks'
> that this file has 'tab' attribute equal to "". During menus 
> generation
> all files with the same 'tab' attribute are in the same menu, so
> clicking on the tab brings you complete index.
> 
> Maybe somebody from forrest-dev could correct this statement?
> 
> Below is a simple example that works for me. Try it on fresh 
> forrest seed
> and then adjust to your needs.
> 
> 
> ===[directory_structure]=======
> 
> 
> xdocs/
> - index.xml
> - site.xml
> - tabs.xml
> - a/
>   - first.xml
>   - second.xml
> - b/
>   - b_index.xml
>   - third.xml
>   - fourth.xml
> - c/
>   - c_index.xml
>   - fifth.xml
>   - sixth.xml
> 
> 
> ===[site.xml]=======
> 
> <site label="MyProj" href="" 
> xmlns="http://apache.org/forrest/linkmap/1.0" tab="a">
> 
>     <main_index_file tab="a">
>         <index href="index.html"/>
>     </main_index_file>
> 
>     <tab_a  href="a/"  label="A"  tab="a">
>         <first  label="First"   href="first.html"/>
>         <second label="Second"  href="second.html"/>
>     </tab_a>
> 
>     <tab_b  href="b/"  label="B"  tab="b">
>         <index                 href="b_index.html"/>
>         <third  label="Third"  href="third.html"/>
>         <fourth label="Fourth" href="fourth.html"/>
>     </tab_b>
>     
>     <tab_c href="c/" label="C" tab="c">
>         <index               href="c_index.html"/>
>         <fifth label="Fifth" href="fifth.html"/>
>         <sixth label="Sixth" href="sixth.html"/>
>     </tab_c>
>     
> </site>
> 
> 
> ===[tabs.xml]=======
> 
> <tabs software="MyProj"
>   title="MyProj"
>   copyright="Foo"
>   xmlns:xlink="http://www.w3.org/1999/xlink">
> 
>   <tab id="a" label="tab_A" dir=""/>
>   <tab id="b" label="tab_B" dir="b" indexfile="b_index.html"/>
>   <tab id="c" label="tab_C" dir="c" indexfile="c_index.html"/>
> 
> </tabs>
> 
> 
> Best regards,
> Lechique
> 


Mime
View raw message