forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Hereth Correia" <>
Subject Re: Problems with menus and menuitems in one menu
Date Wed, 08 Jun 2005 19:30:02 GMT


thanks for the quick response, however it did not work out.

On Wed, Jun 08, 2005 at 12:38:47PM +0200, Cyriaque Dupoirieux wrote:
> J. Hereth Correia a écrit :


> Try something like this :
> <site tab="home">

I read that the tag-attribute is inherited by all child elements. I
experimented with and without this.

> 	<home label="Home" tab="home">
> 	   <subcat label="Subcat" href="subcat/">
> 	     <entry1 label="Entry1" href="entry1.html"/>
> 	     <entry2 label="Entry2" href="entry2.html"/>
> 	   </subcat>

I replaced the complex subcat-entry by just
           <subcat label="Subcat" href="subcat/">

> 	   <contact label="Contact" href="contact.html"/>
> 	</home>
> 	<subcat label="Subcat" tab="subcat" href="subcat/">
> 	     <entry1 label="Entry1" href="entry1.html"/>
> 	     <entry2 label="Entry2" href="entry2.html"/>
> 	</subcat>
> </site>
> >Using a tabs.xml like
> ><tabs>
> > <tab id="" label="Main" dir=""/>
changed to:
    <tab id="home" label="Home" dir="" />
(is this a problem?)

> > <tab id="subcat" label="Subcat" dir="subcat"/>

Here I added:
    <tab id="contact" label="Contact" dir=""/>

> ></tabs>

The behaviour is now as follows: Clicking on the Home or Subcat tabs, I

Home+      (<- even when clicking on Subcat, the Home tab is highlighted(?))
    |     |-Subcat
    |     +-Contact

Clicking on Entry1 brings (almost) the desired result:
Subcat+ (<- correctly highlighted)
      +Subcat+ (<- unnecessary duplication)
             |-(Entry1) (correctly highlighted)

I want to get rid of the intermediate level, i.e. clicking on Home only

and clicking on Subcat

Subcat+  (<- correct tab highlighted)

Clicking on Contact I only get

...+      (<- no tab highlighted (?) )
         +-(Contact) (<- marked as active)

instead of 

Actually, I do not quite get the interplay of site.xml and tabs.xml. At
first I thought that site.xml is basically a pool of nodes which can be
referenced in tabs.xml to build the menus. Duplicating the entries in
site.xml improved the resulting menus, but duplication seems to be a
recipe for confustion for larger sites. Also it means that the
responsibility for the menus is divided between site.xml and tabs.xml.
Is this intentional?

Also, what is the algorithm for determining the tab to be highlighted? I
am surprised that clicking a tab is not marking this tab as active. By
try and error I got the impression that some prefix matching on the href
is done, but I was not able to find the right place in the code (only
looking at the xslt though). Could someone point me out where menu
creation and selected-tab-identification is done? The documentation at
does not go into much detail. I tried to figure out the whole process by
looking at
(however, I had not the time for an in-depth look at the linked pages on 
"Cocoon sitemap" or "Cocoon concepts")
It hinted to the tab2menu.xsl stylesheet, but I did not understand it
(in particular, there is a test:
<xsl:when test="@id and @id = $matching-id">
What does it mean that the attribute @id is equal to a result tree
fragment? Could not find info on that.)

Any help welcome. (Also good keywords to search in the mailinglist
archives or bug database.)

Another problem with jetty: How can I teach jetty to look for
subcat/index.html if the link/href only says "subcat/"? Those links work
of course when deploying the website to our normal Apache webserver, but
getting Cocoon errors about "Resource not found" when using "forrest
run" is a little annoying.

> > 


> >PS: Another problem were the <credits>-Tags. Not having them,
> >common/skinconf.xsl inserted a credit for Apache Forrest. However, the
> >comment in skinconf.xml says "Comment out the whole <credit>-element if
> >you want no credits in the web pages".
> >
> At the moment, the credits are only displayed in the index.html page - 
> it is hard coded in skins but the problem is known...
> You don't have this page...

Well, I have some - only not in the example. It's easy to fix, but I
didn't know if it is already reported as a bug.

Thanks for all comments, best regards,


> Regards,
> Cyriaque,
> *Cyri@que Dupoirieux* <>
> ( 	Tél : - Fax :
> Mobile :
> ------------------------------------------------------------------------
> + 	PCO Technologies <>
> Burolines - 2 ter rue Marcel Doret
> 31700 Blagnac

J. Hereth Correia <>
Dresden University of Technology, Institute for Algebra

View raw message