You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Sylvain Wallez <sy...@apache.org> on 2005/01/23 00:39:53 UTC
Hiding a tab's TOC in the main TOC
Hi all,
Maybe that's a newbie question...
I'm adding a tab to a Forrest site and would like it to have its own
TOC, separate from the main one, i.e. something similar to Forrest's own
web site where Welcome/Project/Documentation/How-To have separate TOCs.
I couldn't find a way to do that using a single site.xml. Is it possible?
Thanks,
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Hiding a tab's TOC in the main TOC
Posted by Sylvain Wallez <sy...@apache.org>.
Thorsten Scherler wrote:
>El dom, 23-01-2005 a las 00:39, Sylvain Wallez escribió:
>
>
>>Hi all,
>>
>>Maybe that's a newbie question...
>>
>>I'm adding a tab to a Forrest site and would like it to have its own
>>TOC, separate from the main one, i.e. something similar to Forrest's own
>>web site where Welcome/Project/Documentation/How-To have separate TOCs.
>>
>>I couldn't find a way to do that using a single site.xml. Is it possible?
>>
>Yes.
>
>
<snip-example/>
>3. Now in http://lenya.apache.org/installation/index.html: you have your
>tab specific TOC or did I missunderstand you?
>
>
No, you understood perfectly! Comparing your examples to my site.xml
(Cocoon's one, actually) I found that the "tab" attribute was missing on
the root <site> tag, and that leads all its children to be displayed in
the main TOC even if they have their own tab attribute.
Adding the tab attribute on the root element solved the problem. Is this
a bug or a feature?
Also, I found another minor bug: having a tab with no sub-nodes leads
the whole TOC to be displayed in the tab. That requires a tab with a
single page to have that page declared as a child of the tab's node.
Anyway, thanks for the hint, Thorsten!
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Hiding a tab's TOC in the main TOC
Posted by Thorsten Scherler <th...@apache.org>.
El dom, 23-01-2005 a las 00:39, Sylvain Wallez escribió:
> Hi all,
>
> Maybe that's a newbie question...
>
> I'm adding a tab to a Forrest site and would like it to have its own
> TOC, separate from the main one, i.e. something similar to Forrest's own
> web site where Welcome/Project/Documentation/How-To have separate TOCs.
>
> I couldn't find a way to do that using a single site.xml. Is it possible?
>
Yes.
1. http://forrest.apache.org/docs/your-project.html#tabs.xml
Add your tag to your tab.xml e.g. lenya:
<tabs software="Lenya CMS"
title="Lenya CMS"
copyright="ASF"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- The rules are:
@dir will always have /index.html added.
@href is not modified unless it is root-relative and obviously
specifies a
directory (ends in '/'), in which case /index.html will be added
-->
<tab label="Project" dir="" id="project" indexfile="index.html"/>
<tab label="Installation" dir="installation" id="installation"
indexfile="index.html"/>
<tab label="Documentation" dir="docs" id="docs"
indexfile="index.html"/>
<tab label="Community" dir="community" id="community"
indexfile="index.html"/>
</tabs>
2. http://forrest.apache.org/docs/linking.html
Now just define which parts of site.xml should refer to a certain tab.
e.g lenya installation <installation tab="installation"/>
http://lenya.apache.org/installation/index.html:
<site xmlns="http://apache.org/forrest/linkmap/1.0" href=""
label="Lenya" tab="project">
<installation href="installation/" label="Installation"
tab="installation">
<download href="index.html" label="Download"/>
<cvs href="subversion.html" label="Subversion Access"/>
<install href="source_version.html" label="Installation
Instructions"/>
</installation>
</site>
3. Now in http://lenya.apache.org/installation/index.html: you have your
tab specific TOC or did I missunderstand you?
HTH
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)