forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdupoiri...@apache.org
Subject svn commit: r369460 - in /forrest/trunk/main/template-sites/v3/src/documentation/resources/themes: common/html/content-motd-page.ft pelt.fv
Date Mon, 16 Jan 2006 12:54:51 GMT
Author: cdupoirieux
Date: Mon Jan 16 04:54:40 2006
New Revision: 369460

URL: http://svn.apache.org/viewcvs?rev=369460&view=rev
Log:
content-motd-page.ft migration (FOR-787)

Added:
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-motd-page.ft
      - copied, changed from r369411, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-motd-page.ft
Modified:
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv

Copied: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-motd-page.ft
(from r369411, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-motd-page.ft)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-motd-page.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-motd-page.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-motd-page.ft&r1=369411&r2=369460&rev=369460&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-motd-page.ft
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-motd-page.ft
Mon Jan 16 04:54:40 2006
@@ -18,7 +18,8 @@
 <forrest:contract 
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
-  name="content-motd-page" type="nugget">
+  name="content-motd-page">
+
   <description>
     <p>Message of the day (MOTD). <br/> If the optional &lt;motd&gt;
element is 
       used, then messages will be appended depending on the URI string pattern.
@@ -38,57 +39,61 @@
       <li>both : both </li>
     </ul>
   </description>
+
   <usage><![CDATA[<forrest:contract name="content-motd-page">
-  <forrest:properties contract="content-motd-page">
-    <forrest:property name="content-motd-page">
-      <motd>
-        <motd-option pattern="samples/sample.html">
-          <motd-title>sample</motd-title>
-          <motd-page location="both">
-            This is an example of a Message of the day (MOTD).
-          </motd-page>
-          <motd-page-url>/samples/faq.html</motd-page-url>
-        </motd-option>
-        <motd-option pattern="samples/faq.html">
-          <motd-title></motd-title>
-          <motd-page location="both">
-            How to enable this MOTD is on this page.
-          </motd-page>
-          <motd-page-url>#motd</motd-page-url>
-        </motd-option>
-      </motd>
-    </forrest:property>
-  </forrest:properties>
+  <forrest:property name="content-motd-page">
+    <motd>
+      <motd-option pattern="samples/sample.html">
+        <motd-title>sample</motd-title>
+        <motd-page location="both">
+          This is an example of a Message of the day (MOTD).
+        </motd-page>
+        <motd-page-url>/samples/faq.html</motd-page-url>
+      </motd-option>
+      <motd-option pattern="samples/faq.html">
+        <motd-title></motd-title>
+        <motd-page location="both">
+          How to enable this MOTD is on this page.
+        </motd-page>
+        <motd-page-url>#motd</motd-page-url>
+      </motd-option>
+    </motd>
+  </forrest:property>
 </forrest:contract>]]></usage>
+
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-    format="html" name="content-motd-page" inputFormat="xsl" body="true" head="false">
-     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-      <xsl:template name="content-motd-page-body" 
-        match="div[@id='content']/div[@id='skinconf-toc-page']">
-        <xsl:param name="content-motd-page"/>
-        <xsl:comment>+ |start content-motd-page +</xsl:comment>
-        <xsl:if test="$content-motd-page/motd">
-          <xsl:for-each select="$content-motd-page/motd/motd-option">
-            <xsl:if test="contains($path, @pattern)">
-              <div class="motd-area">
-                <xsl:value-of select="motd-page"/>
-                <xsl:if test="motd-page-url">
-                  <xsl:text> (</xsl:text>
-                  <a>
-                    <xsl:attribute name="href">
-                      <xsl:value-of select="motd-page-url"/>
-                    </xsl:attribute>
-                    <xsl:text>
-                      <i18n:text >More</i18n:text>
-                    </xsl:text>
-                  </a>
-                  <xsl:text>)</xsl:text>
+    name="content-motd-page" inputFormat="xsl">
+    <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+      <xsl:param name="defaultVariables" select="'test.html'"/>
+      <xsl:param name="content-motd-page"/>
+      <xsl:variable name="path" select="$defaultVariables/*/*[@name='path']/@value"/>
+
+      <xsl:template match="/">
+        <forrest:content>
+          <forrest:part>
+            <xsl:comment>+ |start content-motd-page +</xsl:comment>
+            <xsl:if test="$content-motd-page/motd">
+              <xsl:for-each select="$content-motd-page/motd/motd-option">
+                <xsl:if test="contains($path, @pattern)">
+                  <div class="motd-area">
+                    <xsl:value-of select="motd-page"/>
+                    <xsl:if test="motd-page-url">
+                      <xsl:text> (</xsl:text>
+                      <a>
+                        <xsl:attribute name="href">
+                          <xsl:value-of select="motd-page-url"/>
+                        </xsl:attribute>
+                          <i18n:text >More</i18n:text>
+                      </a>
+                      <xsl:text>)</xsl:text>
+                    </xsl:if>
+                  </div>
                 </xsl:if>
-              </div>
+              </xsl:for-each>
             </xsl:if>
-          </xsl:for-each>
-        </xsl:if>
-        <xsl:comment>+ |end content-motd-page +</xsl:comment>
+            <xsl:comment>+ |end content-motd-page +</xsl:comment>
+          </forrest:part>
+        </forrest:content>
       </xsl:template>
     </xsl:stylesheet>
   </forrest:template>

Modified: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv?rev=369460&r1=369459&r2=369460&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv Mon Jan
16 04:54:40 2006
@@ -344,30 +344,26 @@
               <hr/>
             </forrest:property>
           </forrest:contract>
-          <!--
           <forrest:contract name="content-motd-page">
-            <forrest:properties contract="content-motd-page">
-              <forrest:property name="content-motd-page">
-                <motd>
-                  <motd-option pattern="index.html">
-                    <motd-title>sample</motd-title>
-                    <motd-page location="both">
-                      This is an example of a Message of the day (MOTD).
-                    </motd-page>
-                    <motd-page-url>index.html</motd-page-url>
-                  </motd-option>
-                  <motd-option pattern="samples/faq.html">
-                    <motd-title></motd-title>
-                    <motd-page location="both">
-                      How to enable this MOTD is on this page.
-                    </motd-page>
-                    <motd-page-url>#motd</motd-page-url>
-                  </motd-option>
-                </motd>
-              </forrest:property>
-            </forrest:properties>
+            <forrest:property name="content-motd-page">
+              <motd>
+                <motd-option pattern="index.html">
+                  <motd-title>sample</motd-title>
+                  <motd-page location="both">
+                    This is an example of a Message of the day (MOTD).
+                  </motd-page>
+                  <motd-page-url>index.html</motd-page-url>
+                </motd-option>
+                <motd-option pattern="samples/faq.html">
+                  <motd-title></motd-title>
+                  <motd-page location="both">
+                    How to enable this MOTD is on this page.
+                  </motd-page>
+                  <motd-page-url>#motd</motd-page-url>
+                </motd-option>
+              </motd>
+            </forrest:property>
           </forrest:contract>
-          -->
           <forrest:contract name="nav-section-round-bottom"/>
 
         </forrest:hook>



Mime
View raw message