Header und Footer editierbar gemacht
authorKai Moritz <kai@juplo.de>
Tue, 11 Feb 2014 17:43:38 +0000 (18:43 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 19 Jan 2016 16:45:41 +0000 (17:45 +0100)
Nötig, damit Sonderseiten wie die Startseite, oder das Impressum oder die
About-Seite die Spezial-Links im Header und/oder Footer todschalten können.

src/main/webapp/WEB-INF/spring/tiles.xml
src/main/webapp/WEB-INF/templates/footer.jsp [new file with mode: 0644]
src/main/webapp/WEB-INF/templates/html5page.jsp

index da75727..03c04d7 100644 (file)
@@ -7,11 +7,13 @@
   <definition name="BASEPAGE" template="/WEB-INF/templates/html5page.jsp">
     <put-attribute name="title" value="TITLE IS MISSING" type="string"/>
     <put-attribute name="htmlhead" value="/WEB-INF/templates/html-head.jsp" type="template"/>
   <definition name="BASEPAGE" template="/WEB-INF/templates/html5page.jsp">
     <put-attribute name="title" value="TITLE IS MISSING" type="string"/>
     <put-attribute name="htmlhead" value="/WEB-INF/templates/html-head.jsp" type="template"/>
+    <put-attribute name="header" value="/WEB-INF/templates/header.jsp" type="template"/>
     <put-attribute name="breadcrumb" value="BREADCRUMB IS MISSING" type="string"/>
     <put-attribute name="maincontent" value="/WEB-INF/templates/maincontent.jsp" type="template"/>
     <put-attribute name="contentclass" value="menu" type="string"/>
     <put-attribute name="marginalcontent" value="/WEB-INF/templates/marginalcontent.jsp" type="template"/>
     <put-attribute name="navigation" value="/WEB-INF/templates/navigation.jsp" type="template"/>
     <put-attribute name="breadcrumb" value="BREADCRUMB IS MISSING" type="string"/>
     <put-attribute name="maincontent" value="/WEB-INF/templates/maincontent.jsp" type="template"/>
     <put-attribute name="contentclass" value="menu" type="string"/>
     <put-attribute name="marginalcontent" value="/WEB-INF/templates/marginalcontent.jsp" type="template"/>
     <put-attribute name="navigation" value="/WEB-INF/templates/navigation.jsp" type="template"/>
+    <put-attribute name="footer" value="/WEB-INF/templates/footer.jsp" type="template"/>
   </definition>
 
   <definition name="NOMENU" extends="BASEPAGE">
   </definition>
 
   <definition name="NOMENU" extends="BASEPAGE">
diff --git a/src/main/webapp/WEB-INF/templates/footer.jsp b/src/main/webapp/WEB-INF/templates/footer.jsp
new file mode 100644 (file)
index 0000000..25d4ea3
--- /dev/null
@@ -0,0 +1,8 @@
+<%@page contentType="text/html;charset=UTF-8"%>
+<%@page pageEncoding="UTF-8"%>
+<%@page session="false" %>
+<%@taglib uri="http://www.springframework.org/tags" prefix="s"%>
+<s:url var="base" value="/" />
+<li class="f" id="copyright">© <strong>mo</strong> 2013</li>
+<li class="f"><a class="f" href="${base}contact.html">Contact</a></li>
+<li class="f"><a class="f" href="${base}impressum.html">Impressum</a></li>
index 1ccd625..e15516e 100644 (file)
@@ -15,7 +15,7 @@
     <a id="top"></a>
     <div id="page" class="cf">
       <header id="header">
     <a id="top"></a>
     <div id="page" class="cf">
       <header id="header">
-        <h1 id="logo"><a href="${base}index.html" title="Home" class="l">juplo</a></h1>
+        <t:insertAttribute name="header"/>
         <span id="slogan"><strong>Java</strong> bits from nerds for nerds</span>
         <hr class="h" />
       </header>
         <span id="slogan"><strong>Java</strong> bits from nerds for nerds</span>
         <hr class="h" />
       </header>
@@ -46,9 +46,7 @@
       <footer id="footer">
         <hr class="f" />
         <ul id="footerlinks">
       <footer id="footer">
         <hr class="f" />
         <ul id="footerlinks">
-          <li class="f" id="copyright">© <strong>mo</strong> 2013</li>
-          <li class="f"><a class="f" href="${base}contact.html">Contact</a></li>
-          <li class="f"><a class="f" href="${base}impressum.html">Impressum</a></li>
+          <t:insertAttribute name="footer"/>
         </ul>
       </footer>
     </div>
         </ul>
       </footer>
     </div>