commit bad4ef4437723b5d1934fdc16d870693bbdcfac9
Author: joehni <[email protected]>
AuthorDate: Mon, 13 May 2013 23:55:57 +0200
Commit: joehni <[email protected]>
CommitDate: Mon, 13 May 2013 23:55:57 +0200
Make Page properties directly accessible in skin templates.
diff --git a/xsite-core/src/main/java/org/codehaus/xsite/model/Page.java
b/xsite-core/src/main/java/org/codehaus/xsite/model/Page.java
index abe4b05..8aaff13 100644
--- a/xsite-core/src/main/java/org/codehaus/xsite/model/Page.java
+++ b/xsite-core/src/main/java/org/codehaus/xsite/model/Page.java
@@ -89,4 +89,8 @@ public class Page extends Entry {
}
return paragraphs;
}
+
+ public Map<String, String> getProperties() {
+ return properties;
+ }
}
diff --git a/xsite-distribution/src/site/content/custom.html
b/xsite-distribution/src/site/content/custom.html
index 734319c..27ab3d3 100644
--- a/xsite-distribution/src/site/content/custom.html
+++ b/xsite-distribution/src/site/content/custom.html
@@ -62,7 +62,8 @@ Following <a
href="http://web.archive.org/web/20071008180901/http://www.opensymp
<dt><a
href="javadoc/core/org/codehaus/xsite/extractors/sitemesh/rules/TopLevelBlockExtractingRule.html">TopLevelBlockExtractingRule</a></dt>
<dd>Special rule for the body of the HTML page, that extracts all HTML
top level block elements as individual
paragraphs. The rule will add the number of paragraphs as property
"paragraphs" and all the
- individual paragraphs as property "paragraph.<i>" with
<em>i</em> starting with <em>0</em>.</dd>
+ individual paragraphs as property "paragraph.<i>" with
<em>i</em> starting with <em>0</em>. The
+ Page model provides the paragraphs directly as list for your
convenience.</dd>
</dl>