February 20, 2003
SiteMesh, so easy!
So, today I decided to finally start working through SiteMesh.
I started with zero understanding and had my first decorator setup in no time. The damn thing was up,running and decorating in under 5 minutes.
I did this and then read this. I didn't bother creating my own sitemesh.xml, just a decorators.xml:
1 <decorators defaultdir="/decorators">
2 <decorator name="main" page="main.jsp">
3 <pattern>*</pattern>
4 </decorator>
5
6 <decorator name="panel" page="panel.jsp"/>
7 <decorator name="printable" page="printable.jsp"/>
8 </decorators>
and a decorator main.jsp:
1 <%@ taglib uri="sitemesh-decorator" prefix="decorator" %>
2
3 <html>
4 <head>
5 <title><decorator:title default="My Title" /></title>
6 <decorator:head />
7 </head>
8
9 <body>
10 <!-- Header Page Information -->
11 <%@ include file="../include/head.inc"%>
12
13 <!-- Nav Bar -->
14 <%@ include file="../include/menubar.inc"%>
15
16 <decorator:body />
17
18 <%-- Copyright --%>
19 <%@ include file="../include/copyright.inc"%>
20 </body>
21 </html>
Posted by
Andre Mermegas
at
February 20, 2003 06:51 PM
|
TrackBack