From 069a9e0928ebcaac2df0b23a18fe09c4dcea6dd1 Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 11 Nov 2014 13:20:49 +0000 Subject: [PATCH] Foundry: Some improvments and documentation for the include element. git-svn-id: https://svn.libreccm.org/ccm/trunk@2964 8810af33-2d31-482b-a856-94f89814c4df --- .../foundry/foundry/lib/template-parser.xsl | 51 ++++++++++++++++++- .../web/themes/foundry/foundry/lib/utils.xsl | 10 +++- .../foundry/templates/fragments/libreccm.xml | 6 +++ .../foundry/templates/default-layout.xml | 4 +- 4 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 ccm-sci-bundle/web/themes/foundry/foundry/templates/fragments/libreccm.xml diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl index 493c780fc..e199c444c 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl @@ -88,8 +88,57 @@ + + +

+ This element allows it to include template fragments into a template. The element + has two attributes. The file attribute is mandatory and contains + the path the fragment to include, relative to the template directory. + The internal attribute is optional. If set to true the + fragment is loaded from the internal template directory. +

+

+ For example <include file="fragments/footer.xml"< will include + the file templates/fragments/footer.xml. If the internal + attribute is set to true the file + foundry/templates/fragments/footer.xml would be included. +

+

+ An fragment template file included using this element using this element must + contain a fragment-layout element as root. +

+
+ + +

+ Path of the file to include, relative to the templates directory. +

+
+ +

+ If set to true the template fragment file is loaded from the + internal template directory. +

+
+
+
- + + + + + + + + + + + + + + diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl index 5d14c754a..4ad192ec9 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl @@ -170,10 +170,18 @@ XSLT 2.0 functions. - + + +

+ Variant of gen-path with an additional internal + parameter. If set to true the file is loaded from the + foundry directory. +

+
+
diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/templates/fragments/libreccm.xml b/ccm-sci-bundle/web/themes/foundry/foundry/templates/fragments/libreccm.xml new file mode 100644 index 000000000..24e424299 --- /dev/null +++ b/ccm-sci-bundle/web/themes/foundry/foundry/templates/fragments/libreccm.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml b/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml index 7633d48a5..42016fb57 100644 --- a/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml +++ b/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml @@ -111,7 +111,9 @@ \ No newline at end of file