Author: cdupoirieux
Date: Tue Dec 6 04:11:19 2005
New Revision: 354410
URL: http://svn.apache.org/viewcvs?rev=354410&view=rev
Log:
Give a nugget to eat to the contract which was not working anymore...
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-meta-navigation.ft
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-meta-navigation.ft
URL:
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-meta-navigation.ft?rev=354410&r1=354409&r2=354410&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-meta-navigation.ft
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-meta-navigation.ft
Tue Dec 6 04:11:19 2005
@@ -18,35 +18,47 @@
<forrest:contract name="siteinfo-meta-navigation" type="nugget"
xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
- <p> <strong>siteinfo-meta-navigation</strong> <br/>This functions will
- output the html additional navigation in head element. Implemented
- forrest version/skin name. </p>
+ <p>
+ <strong>siteinfo-meta-navigation</strong> will output the html
additional navigation targets in head element.
+ Implemented forrest 0.8/common. </p>
+ <div class="note">
+ <div class="label">And why ?</div>
+ <div class="content">
+ <p>This contract insert <code><link></code> HTML elements
defined by <a
href="http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-links"
class="fork">W3C</a>
+ which can be interpreted by browsers to navigate between page.<br/>
+ At the moment, the contract implements NEXT, PREVIOUS, LAST, FIRST,
Index and CONTENT pages.
+ </p>
+ </div>
+ </div>
</description>
- <usage><![CDATA[<forrest:contract
name="siteinfo-meta-navigation"/>]]></usage>
+ <usage><![CDATA[<forrest:contract name="siteinfo-meta-navigation">
+ <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:properties>
+</forrest:contract>]]></usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
format="html" name="siteinfo-meta-navigation" inputFormat="xsl"
body="false" head="true">
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="siteinfo-meta-navigation-head">
- <xsl:call-template name="navigation-link-header"/>
- </xsl:template>
<!-- ********************************** -->
<!-- Creates navigation links in header -->
<!-- ********************************** -->
- <xsl:template name="navigation-link-header">
+ <xsl:template name="siteinfo-meta-navigation-head">
+ <xsl:param name="nav-main" select="'test'"/>
+
<!-- Index and Table of Contents -->
<xsl:call-template name="navigation-link-index-content"/>
+
<!-- NEXT, PREVIOUS... -->
- <xsl:for-each select="[EMAIL PROTECTED]'menu']//[EMAIL
PROTECTED]'current']">
+ <xsl:for-each select="$nav-main/navigation/menu/[EMAIL
PROTECTED]'menu']//[EMAIL PROTECTED]'current']">
<!-- NEXT -->
<xsl:if test="ancestor::node()/following-sibling::*[1]//a">
<link rel="NEXT"
- href="{ancestor::node()/following-sibling::*[1]//a/@href}">
- <xsl:attribute name="title">
- <xsl:value-of
- select="ancestor::node()/following-sibling::*[1]//a" />
- </xsl:attribute>
+ href="{ancestor::node()/following-sibling::*[1]//a/@href}"
+ title="{ancestor::node()/following-sibling::*[1]//a}">
</link>
</xsl:if>
<!-- PREVIOUS -->
@@ -82,6 +94,7 @@
</xsl:if>
</xsl:for-each>
</xsl:template>
+
<!-- extraction of the Index and the table of content in order to,
possibly, overide them in skins... -->
<xsl:template name="navigation-link-index-content">
<!-- Index ... -->
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
URL:
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv?rev=354410&r1=354409&r2=354410&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
Tue Dec 6 04:11:19 2005
@@ -198,7 +198,14 @@
</forrest:property>
</forrest:properties>
</forrest:contract>
- <forrest:contract name="siteinfo-meta-navigation"/>
+
+ <forrest:contract name="siteinfo-meta-navigation">
+ <forrest:properties contract="siteinfo-meta-navigation">
+ <forrest:property name="nav-main" nugget="get.navigation">
+ <jx:import
uri="cocoon://${cocoon.parameters.getRequest}.navigation.xml"/>
+ </forrest:property>
+ </forrest:properties>
+ </forrest:contract>
<!-- FIXME - Cocoon problem with favicon.ico -->
<!--<forrest:contract name="siteinfo-meta-icon">
<forrest:properties contract="siteinfo-meta-icon">