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 2006/03/05 12:35:28 UTC
svn commit: r383305 -
/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/siteinfo-meta.ft
Author: thorsten
Date: Sun Mar 5 03:35:24 2006
New Revision: 383305
URL: http://svn.apache.org/viewcvs?rev=383305&view=rev
Log:
Extended the siteinfo-meta contract with arbitrary meta data coming from the structurer. Further enhanced the description of the contract.
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/siteinfo-meta.ft
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/siteinfo-meta.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/siteinfo-meta.ft?rev=383305&r1=383304&r2=383305&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/siteinfo-meta.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/siteinfo-meta.ft Sun Mar 5 03:35:24 2006
@@ -18,22 +18,33 @@
<forrest:contract name="siteinfo-meta"
xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
- <p>This functions will output the html meta information.</p>
- <div class="note">
- <div class="label">Note</div>
- <div class="content">Implemented forrest version/skin name.</div>
- </div>
+ <p>This functions will output html meta information. On the one hand it
+ will add the default forrest specific meta (generator, version and theme)
+ and on the other hand you can add custom meta data via the structurer.</p>
+ <note>Standard output:
+ <source><![CDATA[<meta content="Apache Forrest" name="Generator" />
+<meta content="${forrest.version}" name="Forrest-version" />
+<meta content="${project.theme}" name="Forrest-theme-name" />]]></source>
+ </note>
</description>
- <usage><![CDATA[<forrest:contract name="siteinfo-meta" dataURI="lm://project.build-info"/>]]></usage>
+ <usage><![CDATA[<forrest:contract name="siteinfo-meta" dataURI="lm://project.build-info">
+ [<forrest:property name="custom">
+ <meta name="Description" content="This page was created to help myself, may it help you now!"/>
+ </forrest:property>]
+</forrest:contract>]]></usage>
<forrest:template
xmlns:forrest="http://apache.org/forrest/templates/1.0"
name="siteinfo-meta" inputFormat="xsl">
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="custom" />
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/html/head">
<meta name="Generator" content="Apache Forrest"/>
<xsl:apply-templates/>
+ <xsl:if test="$custom">
+ <xsl:copy-of select="$custom/*"/>
+ </xsl:if>
</forrest:part>
</forrest:content>
</xsl:template>