From ecfcae580be9aaa5dec0e18d5df612deb2ca5a21 Mon Sep 17 00:00:00 2001
From: Olivier PEREZ <olivier@olivierperez.fr>
Date: Mon, 15 Dec 2014 13:33:39 +0100
Subject: [PATCH] Define base template : page.tpl

---
 tpl/page.tpl  | 6 ++++++
 tpl/studs.tpl | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 tpl/page.tpl

diff --git a/tpl/page.tpl b/tpl/page.tpl
new file mode 100644
index 00000000..025864a5
--- /dev/null
+++ b/tpl/page.tpl
@@ -0,0 +1,6 @@
+{include file='head.tpl'}
+{include file='header.tpl'}
+
+{block name=main}{/block}
+
+{include file='footer.tpl'}
\ No newline at end of file
diff --git a/tpl/studs.tpl b/tpl/studs.tpl
index 79424f7e..18b8f446 100644
--- a/tpl/studs.tpl
+++ b/tpl/studs.tpl
@@ -1,6 +1,6 @@
-{include file='head.tpl'}
-{include file='header.tpl'}
+{extends file='page.tpl'}
 
+{block name=main}
 <form action="{$poll_id|poll_url}" method="POST">
 
         {* Global informations about the current poll *}
@@ -258,4 +258,4 @@
             </div>
         {/if}
 </form>
-{include file='footer.tpl'}
\ No newline at end of file
+{/block}
\ No newline at end of file
-- 
GitLab