From 90a0dadbf86390d371b1817c2a26b44fa5225fb0 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 13 Mar 2015 16:54:41 +0000 Subject: [PATCH] Inheritence for Foundry layout templates git-svn-id: https://svn.libreccm.org/ccm/trunk@3282 8810af33-2d31-482b-a856-94f89814c4df --- .../themes/foundry-base/conf/templates.xml | 3 +- .../foundry-base/templates/master-layout.xml | 21 +++++++++ .../foundry-base/templates/nav-layout.xml | 45 +++++++++++++++++++ .../foundry/foundry/lib/template-parser.xsl | 44 +++++++++++++++++- 4 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 ccm-core/web/themes/foundry-base/templates/master-layout.xml create mode 100644 ccm-core/web/themes/foundry-base/templates/nav-layout.xml diff --git a/ccm-core/web/themes/foundry-base/conf/templates.xml b/ccm-core/web/themes/foundry-base/conf/templates.xml index ac59ef508..33841435c 100644 --- a/ccm-core/web/themes/foundry-base/conf/templates.xml +++ b/ccm-core/web/themes/foundry-base/conf/templates.xml @@ -8,7 +8,8 @@ admin-layout.xml portal-workspace.xml portal-workspace-grid.xml - nav-default.xml + + nav-layout.xml admin-layout.xml portal-workspace.xml default-layout.xml diff --git a/ccm-core/web/themes/foundry-base/templates/master-layout.xml b/ccm-core/web/themes/foundry-base/templates/master-layout.xml new file mode 100644 index 000000000..3b4fe88ce --- /dev/null +++ b/ccm-core/web/themes/foundry-base/templates/master-layout.xml @@ -0,0 +1,21 @@ + + + + + <separator>: </separator> + <show-text>layout/page/head/title</show-text> + <show-page-title/> + + + + + +
+ + + + +
+ + +
\ No newline at end of file diff --git a/ccm-core/web/themes/foundry-base/templates/nav-layout.xml b/ccm-core/web/themes/foundry-base/templates/nav-layout.xml new file mode 100644 index 000000000..a303742a7 --- /dev/null +++ b/ccm-core/web/themes/foundry-base/templates/nav-layout.xml @@ -0,0 +1,45 @@ + + + + +
+

+ +

+ +
+ + +
    + +
  • + +
  • +
    +
+ +
+ + + + +

+ page/layout/nav-quicklinks +

+
+ +
+ + + +
+
+ +
+
+
+
+
+ + +
\ No newline at end of file diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-parser.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-parser.xsl index 8fda514dc..923f960cc 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-parser.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-parser.xsl @@ -50,7 +50,7 @@

- + @@ -79,6 +79,48 @@ + + +

+ Root element of an extending template. The extends + attribute is required and points to the template which is + extended by the layout. Only the block elements + in the layout are processed. The master layout must contain + matching insert-block elements. +

+

+ Technically the master template is processed first and the + extending layout is passed as parameter. The master layout +

+
+ #block + #insert-block +
+ + + + + + + + + +

+ The element is used in a master layout to insert a block + from an extending template. +

+
+
+ + + + + + + +