forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: [Structurer] Toc in navbar with pelt theme
Date Mon, 24 Oct 2005 16:32:52 GMT
El lun, 24-10-2005 a las 18:00 +0200, Cyriaque Dupoirieux escribió:
> Hi,
> 
>     The nav-section template now takes :
> 
>     <jx:import
>     uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
> 
> in parameter. I am not sure it is enough to create the mini-toc in the 
> left bar ?

No, you can see this in requesting localhost:8888/index.navigation.xml.

>     Do I add <jx:import 
> uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/> to get 
> information I need or are they in the navigation.xml ?

Yes, you need to extend (in fv)
<forrest:contract name="nav-section">
  <forrest:properties contract="nav-section">
    <forrest:property name="nav-section" nugget="get.navigation">
      <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
    </forrest:property>
    <forrest:property name="nav-section-toc" nugget="get.tov">
      <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
    </forrest:property>
  </forrest:properties>
</forrest:contract>

in the contract:
<xsl:template name="nav-section-body">
  <xsl:param name="nav-section" select="'test'"/>
  <xsl:param name="nav-section-toc" select="'test'"/>
...
<xsl:call-template name="menu">
  <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
  <xsl:with-param name="toc" select="$nav-section-toc"/>
</xsl:call-template>
...
You need to pass this param through the templates (important!!!) till
you find:
<xsl:for-each select = "//tocitems/tocitem"/>
That should then read:
<xsl:for-each select = "$toc//tocitems/tocitem"/>

HTH

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message