You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2005/09/19 14:44:03 UTC

svn commit: r290140 - in /forrest/trunk/whiteboard/plugins: org.apache.forrest.plugin.internal.view/resources/views/ org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/ org.apache.forrest.plugin.output.viewHelper.xhtml/resources/temp...

Author: thorsten
Date: Mon Sep 19 05:43:54 2005
New Revision: 290140

URL: http://svn.apache.org/viewcvs?rev=290140&view=rev
Log:
Started to get rid of skinconf. Updated pelt.fv to work with the new nugget contracts

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/branding-breadcrumbs.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-main-sub.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv?rev=290140&r1=290139&r2=290140&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv Mon Sep 19 05:43:54 2005
@@ -36,7 +36,17 @@
     <!-- forrest:contract name="siteinfo-meta-icon"/ -->
 
     <forrest:hook name="container">
-      <forrest:contract name="branding-breadcrumbs"/>
+      <forrest:contract name="branding-breadcrumbs">
+			  <forrest:properties contract="branding-breadcrumbs">
+			    <forrest:property name="branding-breadcrumbs">
+			      <trail>
+			        <link1 name="Apache Forrest" href="http://forrest.apache.org/"/>
+			        <link2 name="Plugins" href="http://forrest.apache.org/docs/plugins/"/>
+			        <link3 name="org.apache.forrest.plugin.output.viewHelper" href="http://forrest.apache.org/docs/plugins/org.apache.forrest.plugin.output.viewHelper/"/>
+			      </trail>
+			    </forrest:property>
+			  </forrest:properties>
+			</forrest:contract>
       <forrest:hook name="header">
         <forrest:contract name="branding-tagline">
           <forrest:properties contract="branding-tagline">
@@ -58,17 +68,45 @@
           </forrest:properties>
         </forrest:contract>
         <forrest:hook name="nav-main-hook">
-          <forrest:contract name="nav-main"/>
+          <forrest:contract name="nav-main">
+            <forrest:properties contract="nav-main">
+              <forrest:property name="nav-main" nugget="get.navigation">
+                <url>${cocoon.parameters.getRequest}.navigation.xml</url>
+              </forrest:property>
+            </forrest:properties>
+          </forrest:contract>
           <forrest:hook name="publishedStrip">
-            <forrest:contract name="nav-main-sub"/>
+            <forrest:contract name="nav-main-sub">
+						  <forrest:properties contract="nav-main-sub">
+						    <forrest:property name="nav-main-sub" nugget="get.navigation">
+						      <url>#{$cocoon/parameters/getRequest}.navigation.xml</url>
+						    </forrest:property>
+						  </forrest:properties>
+						</forrest:contract>
             <forrest:contract name="siteinfo-current-time"/>
           </forrest:hook>
         </forrest:hook>
       </forrest:hook>
       <forrest:hook name="page">
-        <forrest:contract name="branding-breadcrumbs"/>
+        <forrest:contract name="branding-breadcrumbs">
+				  <forrest:properties contract="branding-breadcrumbs">
+				    <forrest:property name="branding-breadcrumbs">
+				      <trail>
+				        <link1 name="Apache Forrest" href="http://forrest.apache.org/"/>
+				        <link2 name="Plugins" href="http://forrest.apache.org/docs/plugins/"/>
+				        <link3 name="org.apache.forrest.plugin.output.viewHelper" href="http://forrest.apache.org/docs/plugins/org.apache.forrest.plugin.output.viewHelper/"/>
+				      </trail>
+				    </forrest:property>
+				  </forrest:properties>
+				</forrest:contract>
         <forrest:hook name="leftbar">
-          <forrest:contract name="nav-section"/>
+          <forrest:contract name="nav-section">
+					  <forrest:properties contract="nav-section">
+					    <forrest:property name="nav-section" nugget="get.navigation">
+					      <url>#{$cocoon/parameters/getRequest}.navigation.xml</url>
+					    </forrest:property>
+					  </forrest:properties>
+					</forrest:contract>
           <!-- FIXME - hr contract should disappear and be replaced by a top-separator contract argument just like
                        siteinfo-credits -->
           <forrest:contract name="hr"/>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/branding-breadcrumbs.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/branding-breadcrumbs.ft?rev=290140&r1=290139&r2=290140&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/branding-breadcrumbs.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/branding-breadcrumbs.ft Mon Sep 19 05:43:54 2005
@@ -22,7 +22,17 @@
   <description>
     branding-breadcrumbs will output the breadcrumbs.
   </description>
-  <usage><![CDATA[<forrest:contract name="branding-breadcrumbs"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="branding-breadcrumbs">
+  <forrest:properties contract="branding-breadcrumbs">
+    <forrest:property name="branding-breadcrumbs">
+      <trail>
+        <link1 name="Apache Forrest" href="http://forrest.apache.org/"/>
+        <link2 name="Plugins" href="http://forrest.apache.org/docs/plugins/"/>
+        <link3 name="org.apache.forrest.plugin.output.viewHelper" href="http://forrest.apache.org/docs/plugins/org.apache.forrest.plugin.output.viewHelper/"/>
+      </trail>
+    </forrest:property>
+  </forrest:properties>
+</forrest:contract>]]></usage>
   <forrest:template 
     xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
     xmlns:forrest="http://apache.org/forrest/templates/1.0"
@@ -31,14 +41,28 @@
         xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template name="branding-breadcrumbs-body">
+          <xsl:param name="branding-breadcrumbs"/>
   <!--breadcrumbs org location-->
 <xsl:comment>+
     |breadtrail
     +</xsl:comment>
       <div class="breadtrail">
-        <xsl:if test="(//skinconfig/trail/link1/@name)and(//skinconfig/trail/link1/@name!='')"><a href="{//skinconfig/trail/link1/@href}"><xsl:value-of select="//skinconfig/trail/link1/@name"/></a></xsl:if>
-        <xsl:if test="(//skinconfig/trail/link2/@name)and(//skinconfig/trail/link2/@name!='')"> &gt; <a href="{//skinconfig/trail/link2/@href}">  <xsl:value-of select="//skinconfig/trail/link2/@name"/></a> </xsl:if>
-        <xsl:if test="(//skinconfig/trail/link3/@name)and(//skinconfig/trail/link3/@name!='')"> &gt; <a href="{//skinconfig/trail/link3/@href}">  <xsl:value-of select="//skinconfig/trail/link3/@name"/></a> </xsl:if>
+        <xsl:if 
+          test="($branding-breadcrumbs/trail/link1/@name)and($branding-breadcrumbs/trail/link1/@name!='')">
+          <a href="{$branding-breadcrumbs/trail/link1/@href}">
+            <xsl:value-of select="$branding-breadcrumbs/trail/link1/@name"/>
+          </a>
+        </xsl:if>
+        <xsl:if 
+          test="($branding-breadcrumbs/trail/link2/@name)and($branding-breadcrumbs/trail/link2/@name!='')">
+           &gt; <a href="{$branding-breadcrumbs/trail/link2/@href}"> 
+          <xsl:value-of select="$branding-breadcrumbs/trail/link2/@name"/></a> 
+          </xsl:if>
+        <xsl:if 
+          test="($branding-breadcrumbs/trail/link3/@name)and($branding-breadcrumbs/trail/link3/@name!='')">
+           &gt; <a href="{$branding-breadcrumbs/trail/link3/@href}"> 
+          <xsl:value-of select="$branding-breadcrumbs/trail/link3/@name"/></a> 
+          </xsl:if>
         <script type="text/javascript" language="JavaScript" src="{$root}skin/breadcrumbs.js">&#160;</script>
       </div>
         </xsl:template>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-main-sub.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-main-sub.ft?rev=290140&r1=290139&r2=290140&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-main-sub.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-main-sub.ft Mon Sep 19 05:43:54 2005
@@ -20,20 +20,28 @@
   <description>
     nav-main-sub will output the secondary navigation AKA level2.
   </description>
-  <usage><![CDATA[<forrest:contract name="nav-main-sub"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="nav-main-sub">
+  <forrest:properties contract="nav-main-sub">
+    <forrest:property name="nav-main-sub" nugget="get.navigation">
+      <url>${cocoon.parameters.request}.navigation.xml</url>
+    </forrest:property>
+  </forrest:properties>
+</forrest:contract>]]></usage>
   <forrest:template
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
   format="xhtml" name="nav-main-sub" inputFormat="xsl" body="true" head="false">
 
     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 		  <xsl:template name="nav-main-sub-body">
+        <xsl:param name="nav-main-sub" select="'test'"/>
         <xsl:comment>+
     |start nav-main-sub
     +</xsl:comment>
     <!-- FIXME - Suppress the following test when empty div problem is solved -->
-  <xsl:if test="div[@id='nav-main-sub']/*">
+  <xsl:if test="$nav-main-sub/navigation/tab/div[@id='nav-main-sub']/*">
     <div id="level2tabs">
-    <xsl:apply-templates select="div[@id='nav-main-sub']/*"/>
+      <xsl:apply-templates 
+        select="$nav-main-sub/navigation/tab/div[@id='nav-main-sub']/*"/>
     </div>
   </xsl:if>
   <xsl:comment>+

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft?rev=290140&r1=290139&r2=290140&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft Mon Sep 19 05:43:54 2005
@@ -20,7 +20,13 @@
   <description>
     nav-section will output the navigation to pages within the current site section AKA menu
   </description>
-  <usage><![CDATA[<forrest:contract name="nav-section"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="nav-section">
+  <forrest:properties contract="nav-section">
+    <forrest:property name="nav-section" nugget="get.navigation">
+      <url>${cocoon.parameters.request}.navigation.xml</url>
+    </forrest:property>
+  </forrest:properties>
+</forrest:contract>]]></usage>
   <forrest:template
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
   format="xhtml" name="nav-section" inputFormat="xsl" body="true" head="true">
@@ -32,24 +38,28 @@
 		  </xsl:template>
       
 		  <xsl:template name="nav-section-body">
+        <xsl:param name="nav-section" select="'test'"/>
 <xsl:comment>+
     |start menu
     +</xsl:comment>
-            <xsl:if test="div[@id='menu']/ul/li">
-              <xsl:call-template name="menu"/>
+            <xsl:if test="$nav-section/navigation/menu/div[@id='menu']/ul/li">
+              <xsl:call-template name="menu">
+                <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
+              </xsl:call-template>
             </xsl:if>
 <xsl:comment>+
     |end menu
     +</xsl:comment>
 		  </xsl:template>
       <xsl:template name="menu">
+        <xsl:param name="root" value="'test'"/>
 <xsl:comment>+
     |start Menu
     +</xsl:comment>
    	<div id="nav-section">
 			<ul>
 <!--menu - inner-->	
-        <xsl:for-each select = "div[@id='menu']/ul/li">
+        <xsl:for-each select = "$root/div[@id='menu']/ul/li">
           <xsl:call-template name = "innermenuli" >
               <xsl:with-param name="id" select="concat('1.', position())"/>
           </xsl:call-template>