The following comment has been added to this issue:
Author: Cyriaque Dupoirieux
Created: Fri, 11 Mar 2005 10:32 AM
Body:
Ok, I try your example this morning and I have the same result in 0.7-dev.
All I can say is :
- The tabs point on an indexfile which is not used in site.xml
- in tabutil.xsl, the value of $matching-id variable is empty when you click on
a tab.
- whereas it is well valued when you click on link corresponding to a tab.
I think that the <xsl:value-of select="$site//*[starts-with(@href,
$path)]/@tab"/> to define $matching-id is good on my opinion, but I don't
understand why it does not work that case ?
Is it because the indexfile specified in tabs.xml does not appear in site.xml ?
(Can someone link - or merge - the following FOR (FOR-128) which describes the
same problem)
---------------------------------------------------------------------
View this comment:
http://issues.cocoondev.org//browse/FOR-127?page=comments#action_12149
---------------------------------------------------------------------
View the issue:
http://issues.cocoondev.org//browse/FOR-127
Here is an overview of the issue:
---------------------------------------------------------------------
Key: FOR-127
Summary: Tab Menu behaviour
Type: Bug
Status: Unassigned
Priority: Major
Project: Forrest
Components:
Core operations
Versions:
0.6
0.5.1
Assignee:
Reporter: Warrell Harries
Created: Mon, 29 Mar 2004 12:56 PM
Updated: Fri, 11 Mar 2005 10:32 AM
Environment: Any
Description:
For the following site.xml :-
<site label="Hill Crest" href="" xmlns="http://apache.org/forrest/linkmap/1.0"
tab="home">
<children label="Childrens Services" href="children/" tab="children">
<bartons label="The Bartons" href="bartons.html" description="Bartons"/>
<pentwyn label="Pentwyn" href="pentwyn.html" description="Pentwyn" />
<slinfold label="Slinfold" href="slinfold.html" description="Slinfold"
/>
<leyton label="Leyton" href="leyton.html" description="Leyton" />
<norwood label="Norwood" href="norwood.html" description="Norwood" />
<kingsbromley label="Kings Bromley" href="kingsbromley.html"
description="KB" />
</children>
<disability label="Learning Disability Services" href="disability/"
tab="disability">
<penge label="Penge" href="penge.html" description="Penge"/>
<penge label="Vernon" href="vernon.html" description="Vernon"/>
<penge label="Beach Road" href="beachroad.html" description="BR"/>
<penge label="Keston" href="keston.html" description="Keston"/>
</disability>
<foster label="Fostercare" href="foster/" tab="foster">
</foster>
<education label="Education" href="education/" tab="education">
</education>
<referral label="Referral" href="referral/" tab="referral">
</referral>
<recruitment label="Recruitment " href="recruitment/" tab="recruitment">
</recruitment >
</site>
and the following tabs.xml
<tabs software="MyProj"
title="MyProj"
copyright="Foo"
xmlns:xlink="http://www.w3.org/1999/xlink">
<tab id="home" label="Home" dir="" indexfile="index.html"/>
<tab id="children" label="Children's Services" dir="children"
indexfile="index.html"/>
<tab id="disability" label="Learning Disability Services" dir="disability"
indexfile="index.html"/>
<tab id="foster" label="Fostercare" dir="foster" indexfile="index.html"/>
<tab id="education" label="Education" dir="education" indexfile="index.html"/>
<tab id="referral" label="Referral" dir="referral" indexfile="index.html"/>
<tab id="recruitment" label="Recruitment" dir="recruitment"
indexfile="index.html"/>
</tabs>
The tabs are not selected when clicked. i fixed this by changing the
tab2menu.xsl template to this :-
<xsl:template match="tab" mode="level1">
<xsl:choose>
<xsl:when test="@id and @id = $matching-id">
<xsl:call-template name="selected"/>
</xsl:when>
<xsl:when test="not(@id) and @dir = $longest-dir or @href = $longest-dir
or @dir = $longest-dir ">
<xsl:call-template name="selected"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="not-selected"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
The long test is not correct because it assumes an id is not being used and
therefore does not check the directory.
It would be much better if forrest had a single way of defining tabs and menus
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.cocoondev.org//secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira