You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2007/07/31 23:22:24 UTC
svn commit: r561553 [4/5] - in /roller/trunk/apps/weblogger/docs:
installguide/ installguide/generated/ installguide/generated/html/
templateguide/ templateguide/generated/ templateguide/generated/html/
userguide/ userguide/generated/ userguide/generat...
Modified: roller/trunk/apps/weblogger/docs/templateguide/generated/html/roller-template-guide.html
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/docs/templateguide/generated/html/roller-template-guide.html?view=diff&rev=561553&r1=561552&r2=561553
==============================================================================
--- roller/trunk/apps/weblogger/docs/templateguide/generated/html/roller-template-guide.html (original)
+++ roller/trunk/apps/weblogger/docs/templateguide/generated/html/roller-template-guide.html Tue Jul 31 14:22:22 2007
@@ -1,4945 +1,4701 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
- <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="NeoOffice 2.0 Aqua Beta 3 (Unix)">
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.1 (Solaris x86)">
<META NAME="AUTHOR" CONTENT="Dave Johnson">
- <META NAME="CREATED" CONTENT="20051209;11500200">
- <META NAME="CHANGED" CONTENT="20061220;11100100">
- <META NAME="SDFOOTNOTE" CONTENT=";;;;P">
- <META NAME="SDENDNOTE" CONTENT="ARABIC">
+ <META NAME="CREATED" CONTENT="20070731;16320200">
+ <META NAME="CHANGEDBY" CONTENT="Dave Johnson">
+ <META NAME="CHANGED" CONTENT="20070731;17165500">
+ <META NAME="KEYWORDS" CONTENT="OpenDS Directory Server Administration Framework">
<STYLE>
<!--
- @page { size: 8.5in 11in; margin: 0.5in }
- P { margin-bottom: 0.08in; background: transparent }
- P.western { font-family: "Times New Roman"; font-weight: medium }
- P.cjk { font-weight: medium }
- P.ctl { font-weight: medium }
- H1.cjk { font-family: "Andale Sans UI" }
- H1.ctl { font-family: "Lucidasans" }
- H2.western { font-family: "Thorndale", serif }
- H2.cjk { font-family: "Andale Sans UI" }
- H2.ctl { font-family: "Lucidasans" }
- H3.western { font-family: "Thorndale", serif }
- H3.cjk { font-family: "Andale Sans UI" }
+ P { margin-bottom: 0.08in; widows: 2; orphans: 2 }
+ P.western { font-family: "Times New Roman", serif }
+ H1 { margin-bottom: 0.08in; border-top: none; border-bottom: 2.50pt solid #000000; border-left: none; border-right: none; padding: 0in; widows: 2; orphans: 2 }
+ H1.western { font-family: "Helvetica", sans-serif; font-size: 22pt; font-style: italic }
+ H1.cjk { font-family: "Mincho"; font-size: 16pt }
+ H1.ctl { font-family: "Lucidasans"; font-size: 16pt }
+ H2 { margin-bottom: 0.08in; widows: 2; orphans: 2 }
+ H2.western { font-family: "Helvetica", sans-serif; font-style: italic }
+ H2.cjk { font-family: "Mincho"; font-size: 14pt; font-style: italic }
+ H2.ctl { font-family: "Lucidasans"; font-size: 14pt; font-style: italic }
+ H3 { margin-bottom: 0.08in; widows: 2; orphans: 2 }
+ H3.western { font-family: "Helvetica", sans-serif; font-size: 16pt }
+ H3.cjk { font-family: "Mincho" }
H3.ctl { font-family: "Lucidasans" }
- TD P { margin-bottom: 0in }
- TD P.western { font-family: "Times New Roman" }
- TH P { margin-bottom: 0in }
- TH P.western { font-family: "Times New Roman" }
- P.frame-contents-western { font-family: "Times New Roman"; font-weight: medium }
- P.frame-contents-cjk { font-weight: medium }
- P.frame-contents-ctl { font-weight: medium }
- P.roller-macro-title-western { background: #cccccc; border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.04in; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; font-family: "Times New Roman"; font-weight: medium }
- P.roller-macro-title-cjk { background: #cccccc; border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.04in; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; font-weight: medium }
- P.roller-macro-title-ctl { background: #cccccc; border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.04in; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; font-weight: medium }
- P.roller-macro-synopsys-western { margin-left: 0.5in; font-family: "Times New Roman"; font-weight: medium }
- P.roller-macro-synopsys-cjk { margin-left: 0.5in; font-weight: medium }
- P.roller-macro-synopsys-ctl { margin-left: 0.5in; font-weight: medium }
+ TD P { margin-bottom: 0in; widows: 2; orphans: 2; page-break-before: auto }
+ TD P.western { font-family: "Times New Roman", serif; font-size: 10pt }
+ TH P { margin-bottom: 0in; border-top: none; border-bottom: 2.50pt solid #000000; border-left: none; border-right: none; padding: 0in; widows: 2; orphans: 2; page-break-before: auto }
+ TH P.western { font-family: "Helvetica", sans-serif; font-size: 10pt; font-style: oblique }
+ TH P.cjk { font-style: italic }
+ TH P.ctl { font-style: italic }
+ P.frame-contents-western { font-family: "Times New Roman", serif }
+ P.roller-macro-title-western { background: #cccccc; border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.04in; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; font-family: "Times New Roman", serif }
+ P.roller-macro-title-cjk { background: #cccccc; border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.04in; padding-bottom: 0in; padding-left: 0in; padding-right: 0in }
+ P.roller-macro-title-ctl { background: #cccccc; border-top: 1px solid #000000; border-bottom: none; border-left: none; border-right: none; padding-top: 0.04in; padding-bottom: 0in; padding-left: 0in; padding-right: 0in }
+ P.roller-macro-synopsys-western { margin-left: 0.5in; font-family: "Times New Roman", serif }
+ P.roller-macro-synopsys-cjk { margin-left: 0.5in }
+ P.roller-macro-synopsys-ctl { margin-left: 0.5in }
-->
</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
-<P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
+<P CLASS="western" ALIGN=RIGHT STYLE="margin-bottom: 0in; background: transparent">
+<IMG SRC="roller-template-guide_html_490f4977.png" NAME="graphics5" ALIGN=BOTTOM WIDTH=210 HEIGHT=85 BORDER=0></P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
<BR>
</P>
-<DIV ID="wrapper" DIR="LTR">
- <DIV ID="banner" DIR="LTR">
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent">
- <FONT SIZE=7 STYLE="font-size: 40pt"><B>Template Guide</B></FONT></P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent">
- <FONT SIZE=7 STYLE="font-size: 32pt"><B>Apache Roller</B></FONT></P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent">
- <FONT SIZE=5 STYLE="font-size: 20pt"><B>(incubating) </B></FONT>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent"><A NAME="DDE_LINK"></A>
- <FONT SIZE=7 STYLE="font-size: 32pt"><B>Version 3.2</B></FONT></P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" ALIGN=LEFT><FONT FACE="Courier New"><FONT SIZE=1 STYLE="font-size: 8pt"><I>Licensed
- to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. The ASF licenses this file to You
- under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at</I></FONT></FONT></P>
- <P CLASS="western" ALIGN=LEFT>
- <FONT FACE="Courier New"><FONT SIZE=1 STYLE="font-size: 8pt"><I>http://www.apache.org/licenses/LICENSE-2.0</I></FONT></FONT></P>
- <P CLASS="western" ALIGN=LEFT><FONT FACE="Courier New"><FONT SIZE=1 STYLE="font-size: 8pt"><I>Unless
- required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS"
- BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing
- permissions and limitations under the License. For additional
- information regarding copyright in this work, please see the NOTICE
- file in the top level directory of this distribution.</I></FONT></FONT></P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=RIGHT STYLE="margin-bottom: 0in; background: transparent">
+<FONT FACE="Helvetica, sans-serif"><FONT SIZE=7><B>Template Guide</B></FONT></FONT></P>
+<P CLASS="western" ALIGN=RIGHT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<FONT FACE="Helvetica, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Apache
+Roller Weblogger </B></FONT></FONT>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<FONT FACE="Helvetica, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Version
+4.0 (DRAFT)</B></FONT></FONT></P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<SDFIELD TYPE=DOCINFO SUBTYPE=CHANGE FORMAT=DATE SDNUM="1033;1033;MMMM YYYY">July 2007</SDFIELD></P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent; page-break-before: always">
+<BR>
+</P>
+<DIV ID="Table of Contents1" DIR="LTR">
+ <DIV ID="Table of Contents1_Head" DIR="LTR">
+ <P STYLE="margin-top: 0.17in; page-break-after: avoid"><FONT FACE="Helvetica, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Table
+ of Contents</B></FONT></FONT></P>
</DIV>
- <DIV ID="centercontent" DIR="LTR">
- <P CLASS="western" STYLE="page-break-before: always"><BR><BR>
- </P>
- <DIV ID="Table of Contents1" DIR="LTR">
- <DIV ID="Table of Contents2_Head" DIR="LTR">
- <P STYLE="margin-top: 0.17in; margin-bottom: 0.2in; background: transparent; page-break-after: avoid">
- <FONT FACE="Albany, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Table
- of Contents</B></FONT></FONT></P>
- </DIV>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>1
- - Introduction 3</B></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>2
- - Overview 4</B></FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">2.1 - Page templates 4</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">2.2 - The Velocity
- template language 4</FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>3
- - Editing and creating page templates 6</B></FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">3.1 - The Weblog
- template 6</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">3.2 - The _day
- template 8</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">3.3 - Customizing your
- theme 9</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">3.4 - Editing and
- creating page templates 10</FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>4
- - Using models, objects and macros 12</B></FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">4.1 - Accessing data
- via models and objects 12</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">4.2 - Calling
- macros 12</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">4.3 - A word about
- pagers 13</FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>5
- - Model Object Reference 14</B></FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">5.1 - $config 14</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">5.2 - $model 15</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">5.3 - $url 17</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">5.4 - $utils 18</FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>6
- - Data Object Reference 19</B></FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.1 - Bookmark 19</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.2 -
- BookmarkFolder 19</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.3 - Comment 20</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.4 - PageTemplate 20</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.5 - Referrer 20</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.6 - TagStat 21</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.7 - User 21</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.8 - Weblog 21</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.9 -
- WeblogCategory 22</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.10 - WeblogEntry 22</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.11 -
- WeblogEntryTag 23</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">6.12 -
- WeblogEntryAttribute 23</FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>7
- - Macro Reference 24</B></FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">7.1 - Entry macros 24</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">7.2 - Comment
- macros 24</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">7.3 - List macros 24</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">7.4 - Menu macros 24</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">7.5 - Search macros 24</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">7.6 - Misc. macros 25</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">7.7 - Displaying a Tag
- Cloud 25</FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT SIZE=4 STYLE="font-size: 16pt"><B>8
- - Additional models 26</B></FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">8.1 - $site 26</FONT></P>
- <P STYLE="margin-left: 0.2in; margin-bottom: 0in; background: transparent; font-weight: medium">
- </SPAN><FONT SIZE=2 STYLE="font-size: 11pt">8.2 - $planet 27</FONT></P>
- </DIV>
- <P CLASS="western"><BR><BR>
- </P>
- <H1 CLASS="western" STYLE="page-break-before: always">1 - Introduction</H1>
- <P CLASS="western">If you know a little about HTML and CSS, then
- you'll find that it's easy to customize the appearance, layout and
- content of your Roller-based weblog. You can change the appearance
- of any of your weblog's pages and add as many new pages as you
- want. Any Roller user can do it through Roller's web-based
- interface and it's all done with Roller's simple and easy-to-use
- template language. In this guide, we'll tell you how. We'll start
- by explaining how Roller's weblog template system works then we'll
- provide a reference to the objects and macros that you can use in
- your templates.</P>
- <P CLASS="western"><I>NOTE: If you have only AUTHOR or LIMITED
- permissions within a weblog then you won't have access to the
- Preferences->Theme or Preferences->Templates pages and you
- won't be able to change or customize your theme. You need to have
- ADMIN permission within a weblog to be able to do the things
- described in this guide.</I></P>
- <P CLASS="western"><I>NOTE: It is possible for a Roller site
- administrator to disable theme customization. So if you do have
- ADMIN permission in your weblog and you still don't see the
- Preferences->Templates page, perhaps your Roller site does not
- allow customization.</I></P>
- <P CLASS="western"><BR><BR>
- </P>
- <H1 CLASS="western" STYLE="page-break-before: always">2 - Overview</H1>
- <P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- Each Roller weblog is defined by a set of page templates, which you
- can edit to customize the content, layout and appearance of your
- weblog.
- </P>
- <H2 CLASS="western">2.1 - Page templates</H2>
- <P CLASS="western">When you create a new Roller weblog you must
- pick a theme to define the new weblog's appearance and layout. A
- theme is just a small set of templates, where each template
- contains HTML code, template language expressions and macros.
- What's a template? A template for an HTML web page is simply an
- HTML web page with some Velocity code embedded inside. For example,
- this is a valid Roller template, with one Velocity expression:</P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><html></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><body></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2>My
- blog is named <B>$model.weblog.name</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><BR>
- </P>
- <P CLASS="western">The string "$model.weblog.name" is a
- template language expression and when Roller displays the template,
- that expression will be replaced with the name of the weblog.</P>
- <P CLASS="western">Note that <B>$model</B> is something special.
- Roller makes a set of objects, known as <I>models</I>, available to
- page templates. In the example above, we see only the $model
- object, but here are others. You'll learn more about models in
- Section 4 and Section 5 provides a complete reference.</P>
- <H2 CLASS="western">2.2 - The Velocity template language</H2>
- <P CLASS="western">The simple template language that we use inside
- Roller page templates is called Velocity. It's designed to be
- simple and easy for even non-programmers, but it's also a simple
- programming language. You can set variables, use if-else
- conditional logic and create loops.
- </P>
- <P CLASS="western">For example, this Roller page template will list
- the categories available in your weblog except for the one named
- Music:</P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><html></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><body></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2>My
- blog is named <B>$model.weblog.name</B>. These are my
- categories:<br></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#foreach ($cat in
- $model.weblog.categories)</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#if ($cat.name != "Music")</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>$cat.name</B><br></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><BR>
- </P>
- <P CLASS="western">Velocity also supports the concepts of <I>macros</I>.
- A macro is essentially a Velocity method call. We use them in
- Roller to generate HTML. For example, as illustrated below, to
- display a bookmark folder you first retrieve if from the weblog and
- second pass it to the <FONT SIZE=2><FONT FACE="Courier New">#showBookmarkLinksList()</FONT></FONT>
- macro to display it as an HTML <FONT SIZE=2><FONT FACE="Courier New"><ul></FONT></FONT>
- list.</P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><html></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><body></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h2>Blogroll</h2></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#set($rootFolder =
- $model.weblog.getBookmarkFolder("/"))</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showBookmarkLinksList($rootFolder
- false false) </B></FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><BR>
- </P>
- <P CLASS="western">You'll learn more about macros in Section 4 and
- Section 7 provides a complete reference to the standard Roller
- macros. If you want more information on Velocity. the Here are
- links to the User and Reference guides:</P>
- <UL>
- <LI><P CLASS="western"><A HREF="http://jakarta.apache.org/velocity/docs/user-guide.html">http://jakarta.apache.org/velocity/docs/user-guide.html</A></P>
- <LI><P CLASS="western"><A HREF="http://jakarta.apache.org/velocity/docs/vtl-reference-guide.html">http://jakarta.apache.org/velocity/docs/vtl-reference-guide.html</A></P>
- </UL>
- <P CLASS="western"><BR><BR>
- </P>
- <P CLASS="western">Now that we've covered the basic concepts of
- page templates and the Velocity template language, let's dig into
- the details of editing templates.</P>
- <P CLASS="western"><BR><BR>
- </P>
- <H1 CLASS="western" STYLE="page-break-before: always">3 - Editing
- and creating page templates</H1>
- <P CLASS="western">After you've used Roller <B>Preferences->Themes</B>
- page to customize your weblog theme, you can edit and create page
- templates through the <B>Preferences->Templates</B> page. We'll
- show you how to do that, but first you need to understand how the
- required pages, found in every theme, work together to display a
- weblog.</P>
- <P CLASS="western">Every theme is different, but all themes must
- have two required pages -- pages that you cannot rename or delete.
- These are the <B>Weblog</B> template, which defines the main page
- of your blog, and the <B>_day</B> template, which defines how each
- day's worth of blog entries is displayed on your main page. Some
- themes also have a required page named <B>_css</B> which defines
- the CSS style code used by the weblog.</P>
- <P CLASS="western">First, let's look at a simple Weblog template.
- </P>
- <H2 CLASS="western">3.1 - The Weblog template</H2>
- <P CLASS="western">Below is a simple Weblog page that displays all
- of the data that weblog typically contains including recent entries
- with paging to past entries, category link, feed links, a calendar
- and feed auto-discovery. Check the annotations for more detail.</P>
- <P CLASS="western" ALIGN=LEFT><I>Listing 1: a typical Weblog
- template </I>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2><!DOCTYPE
- html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2><html><head>
- </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><title><B>$model.weblog.name</B>
- : <B>$model.weblogPage.name</B></title> <B>#1</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showAutodiscoveryLinks($model.weblog)
- #2</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><style
- type="text/css"><B>#includeTemplate($model.weblog
- "_css")</B></style> <B>#3</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2></head>
- </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2><body>
- </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2><table
- border="0" align="center" width="95%"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><tr>
- </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><td
- class="entries" width="80%" valign="top"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h1><B>$model.weblog.name</B></h1>
- <B>#4</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><p
- class="descrip"><B>$model.weblog.description</B></p>
- </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#set($rootCategory =
- $model.weblog.getWeblogCategory("nil")) #5</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogCategoryLinksList($rootCategory
- false false)</B><br> </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#set($pager =
- $model.getWeblogEntriesPager()) #6</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><div
- class="next-previous"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#if
- ($model.results) #7</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogSearchAgainForm($model.weblog) </B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showNextPrevSearchControl($pager)
- </B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#else</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showNextPrevEntriesControl($pager)
- #8</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2></div></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntriesPager($pager)
- #9</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#if ($model.permalink)
- #10</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntryComments($entry)
- </B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntryCommentForm($entry)
- </B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2></td> </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><td
- width="20%" valign="top"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h2>Calendar</h2>
- </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntryCalendar($model.weblog
- "nil") #11</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h2>Feeds</h2> </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showAtomFeedsList($model.weblog)
- #12</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h2>Search</h2></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogSearchForm($model.weblog
- false) #13</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h2>Links</h2></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#set($rootFolder =
- $model.weblog.getBookmarkFolder("/")) #14</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showBookmarkLinksList($rootFolder
- false false) </B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h2>Navigation</h2></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showPageMenu($model.weblog)
- #15</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showAuthorMenu(true)
- #16</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><h2>Referrers</h2></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#set($refs =
- $model.weblog.getTodaysReferrers()) #17</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#showReferrersList($refs
- 30 20) </B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2></td></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></tr></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2></table></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><BR>
- </P>
- <P CLASS="western">The above template includes a good mix of
- Velocity expressions and statements. There's a lot going on, so
- let's explain it in detail. Here's the point-by-point breakdown.</P>
- <OL>
- <OL>
- <OL>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>HTML title</B><BR>For the HTML title we use the weblog's
- name, a colon and the name of the page template that is
- currently being displayed.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Auto-discovery links</B><BR>The <FONT SIZE=2><FONT FACE="Courier New">#showAutodiscoveryLinks()
- </FONT></FONT>macro adds the HTML <FONT SIZE=2><FONT FACE="Courier New"><link></FONT></FONT>
- elements required for RSS and Atom feed auto-discovery as well
- as RSD for weblog clients.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Include CSS styles</B><BR>Here we use the include the theme's
- <B>_css</B> template directly in the page, right inside a pair
- of <FONT SIZE=2><FONT FACE="Courier New"><style></FONT></FONT>
- tags.
- </P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Display a page title</B><BR>Here we use the weblog's name
- again in an <FONT FACE="Courier New"><h1></FONT> title.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Category links list</B><BR>Display a list of weblog category
- links.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Get entries pager</B><BR>Get the entries pager object so we
- can display entries and a paging control.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Show search results control?</B> <BR>Show search results
- pager control if search in progress</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Else . . .<BR></B>Show normal entries pager control.
- </P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Show entries</B><BR>Show current page's worth of entries (or
- search results). Calls on <B>_day</B> template to do the display
- of each day's worth of entries.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Show comments?</B> <BR>If we're on a permalink page, then
- show comments and comments form</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Show the calendar</B> <BR>Show the standard weblog calendar.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Show feed links</B><BR>Show links to all available Atom entry
- feeds, one per category.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Search form</B><BR>Show the weblog search form, false
- indicates no category chooser.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Display blogroll</B><BR>Display contents of the root bookmark
- folder.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Show page menu</B><BR>Display navigation bar of pages
- available in weblog.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Show author menu</B><BR>Display author's menu, only visible
- to authorized users.</P>
- <LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <B>Display today's referrers</B><BR>Display today's referrer URL
- with hit counts.</P>
- </OL>
- </OL>
- </OL>
- <P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- <BR>
- </P>
- <P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
- Note in point #9 that the display of the weblog entries is
- controlled by another template, the _day template. So next let's
- take a look at that _day template.</P>
- <H2 CLASS="western">3.2 - The _day template</H2>
- <P CLASS="western">A theme's _day template is responsible for
- displaying one day's worth of weblog entries. Here's a typical _day
- template, one that corresponds to the above Weblog template.</P>
- <P CLASS="western"><I>Listing 2: a typical _day template</I></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2><div
- class="dayBox"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><div
- class="dayTitle"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>$utils.formatDate($day,
- "EEEE MMM dd, yyyy") #1</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></div></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#foreach($entry in
- $entries) #2</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><div
- class="entryBox"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><p
- class="entryTitle"><B>$entry.title</B></p> <B>#3</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><p
- class="entryContent"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>#if($model.permalink) <B>#4</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>$entry.displayContent</FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>#else</FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>$entry.displayContent($url.entry($entry.anchor))</FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>#end</FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><SPAN STYLE="font-weight: medium"></p></SPAN></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><BR>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><p
- class="entryInfo"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>Posted at </FONT></FONT>
- </P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><a
- href="<B>$url.entry($entry.anchor)</B>">
- <B>#5</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>$utils.formatDate($entry.pubTime,
- "hh:mma MMM dd, yyyy")</B></a></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>by <B>$entry.creator.fullName</B>
- in <B>#6</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><span
- class="category"><B>$entry.category.name</B></span>
- &nbsp;|&nbsp; <B>#7</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#if
- ($utils.isUserAuthorizedToAuthor($entry.website)) #8</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><a
- href="<B>$url.editEntry($entry.anchor)</B>"><B>Edit</B></a>
- &nbsp;|&nbsp;</FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>#if($entry.commentsStillAllowed
- || $entry.commentCount > 0) <B>#9</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>#set($link =
- "$url.comments($entry.anchor)" )</FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><a href="<B>$link</B>"
- class="commentsLink"></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2>Comments[<B>$entry.commentCount</B>]</a></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent">
- <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></p></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2></div></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"> <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2></div></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><BR>
- </P>
- <P CLASS="western">And here's a point-by-point description of the
- template language expressions and statements found in the above day
- template:</P>
- <OL>
- <LI><P CLASS="western"><B>Display day header.</B><BR>For the day
- header, we display the current date in a long format.</P>
- <LI><P CLASS="western"><B>Loop through day's entries.</B><BR>Here
- we use a $foreach loop to iterate through the $entries collection</P>
- <LI><P CLASS="western"><B>Display entry title.</B><BR>Display the
- entry title in a <div> so that it can be easily styled.</P>
- <LI><P CLASS="western"><B>Display entry content or summary.</B><BR>If
- we're on a permalink page, show the entry's content. Otherwise,
- show the summary if a summary is available.</P>
- <LI><P CLASS="western"><B>Display entry permalink.</B><BR>Display
- permanent link to the entry.</P>
- <LI><P CLASS="western"><B>Display entry author's name.</B><BR>Display
- the name of the author of the entry.</P>
- <LI><P CLASS="western"><B>Display entry category.</B><BR>Display
- the name of the category associated with the entry.</P>
- <LI><P CLASS="western"><B>Show edit link.</B><BR>If user is
- authorized, display link to edit the entry.</P>
- <LI><P CLASS="western"><B>Show comments link.</B><BR>If comments
- are available or are still allowed, display link to entry
- comments.</P>
- </OL>
- <P CLASS="western">Now you've seen the required templates and
- you've seen most of the commonly used macros in action, let's
- discuss the mechanics of customizing your theme.</P>
- <H2 CLASS="western">3.3 - Customizing your theme</H2>
- <P CLASS="western">When you start a Roller weblog and you pick a
- theme, your weblog uses a <I>shared</I> copy of that theme. The
- page templates that define your theme are shared by all of the
- other users who have also picked that theme. Using a shared theme
- is nice because, when your Roller site administrator makes fixes
- and improvements to that shared theme, then you'll get those
- automatically. But you can't customize a shared theme. Before you
- can customize your theme, you've got to get your own copy of the
- theme's page templates like so:</P>
- <P CLASS="western"><BR><BR>
- </P>
+ <P STYLE="margin-bottom: 0in"> <FONT SIZE=3><B>1 Overview 4</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in"> 1.1 Copyright and
+ trademark information 4</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in"> 1.2 Feedback 4</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in"> 1.3
+ Acknowledgments 4</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in"> 1.4 Modifications
+ and Updates 4</P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>1 Introduction 5</B></FONT></P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>2 The Roller
+ template system 6</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">2.1 Page
+ templates 6</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">2.2 The Velocity
+ template language 6</P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>3 Editing and
+ creating page templates 8</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">3.1 The Weblog
+ template 8</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">3.2 The _day
+ template 10</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">3.3 Customizing
+ your theme 11</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">3.4 Editing and
+ creating page templates 12</P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>4 Using models,
+ objects and macros 14</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">4.1 Accessing
+ data via models and objects 14</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">4.1.1 Accessing
+ object properties 14</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">4.1.2 Calling
+ object methods 14</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">4.2 Calling
+ macros 14</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">4.3 A word about
+ pagers 15</P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>5 Model Object
+ Reference 16</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">5.1 $config 16</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">5.1.1 $config
+ Properties 16</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">5.1.2 $config
+ Methods 16</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">5.2 $model 17</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">5.2.1 $model
+ Properties 17</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">5.2.2 $model
+ Search Properties 18</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">5.2.3 $model
+ methods 18</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">5.3 $url 19</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">5.4 $utils 21</P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>6 Data Object
+ Reference 22</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.1 Bookmark 22</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.2
+ BookmarkFolder 22</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.3 Comment 23</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.4
+ PageTemplate 23</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.5 Referrer 23</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.6 TagStat 24</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.7 User 24</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.8 Weblog 24</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.9
+ WeblogCategory 25</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.10
+ WeblogEntry 25</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.11
+ WeblogEntryTag 26</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">6.12
+ WeblogEntryAttribute 27</P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>7 Macro Reference 28</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">7.1 Entry
+ macros 28</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">7.2 Comment
+ macros 29</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">7.3 List
+ macros 30</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">7.4 Menu
+ macros 32</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">7.5 Search
+ macros 32</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">7.6 Misc.
+ macros 33</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">7.7 Displaying a
+ Tag Cloud 37</P>
+ <P STYLE="margin-bottom: 0in"><FONT SIZE=3><B>8 Additional
+ models 38</B></FONT></P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">8.1 $site 38</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">8.1.1 $site
+ Objects 38</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">8.1.2 $site
+ Methods 38</P>
+ <P STYLE="margin-left: 0.2in; margin-bottom: 0in">8.2 $planet 39</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">8.2.1
+ Configuring the planet model 39</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">8.2.2 $planet
+ Objects 40</P>
+ <P STYLE="margin-left: 0.39in; margin-bottom: 0in">8.2.3 $planet
+ Methods 41</P>
+</DIV>
+<P CLASS="western"><BR><BR>
+</P>
+<OL>
+ <LI><H1 CLASS="western" STYLE="page-break-before: always">Overview</H1>
+</OL>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+This document is a Template Guide to the Apache Roller Weblogger, the
+Java-based and open source weblog server that is produced by the
+Apache Roller project of the Apache Software Foundation.</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<OL>
+ <OL>
+ <LI><H2 CLASS="western">Copyright and trademark information</H2>
+ </OL>
+</OL>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+The contents of this document are subject to the terms of the Apache
+Software License.</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+All trademarks within this document belong to legitimate owners.</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<OL>
+ <OL START=2>
+ <LI><H2 CLASS="western">Feedback</H2>
+ </OL>
+</OL>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+Please direct any comments or suggestions about this document to:
+dev@roller.apache.org</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<OL>
+ <OL START=3>
+ <LI><H2 CLASS="western">Acknowledgments</H2>
+ </OL>
+</OL>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+The general format of this document was based on the documentation
+template used by <A HREF="http://www.OpenOffice.org/">OpenOffice.org</A>.</P>
+<P CLASS="western" ALIGN=LEFT STYLE="margin-bottom: 0in; background: transparent">
+<BR>
+</P>
+<OL>
+ <OL START=4>
+ <LI><H2 CLASS="western">Modifications and Updates</H2>
+ </OL>
+</OL>
+<TABLE WIDTH=100% BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0 RULES=COLS STYLE="page-break-inside: avoid">
+ <COL WIDTH=59*>
+ <COL WIDTH=197*>
+ <THEAD>
+ <TR VALIGN=TOP>
+ <TH WIDTH=23%>
+ <P CLASS="western" ALIGN=LEFT>Date</P>
+ </TH>
+ <TH WIDTH=77%>
+ <P CLASS="western" ALIGN=LEFT>Description of Change</P>
+ </TH>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR VALIGN=TOP>
+ <TD WIDTH=23%>
+ <P CLASS="western" ALIGN=LEFT>July 31, 2007</P>
+ </TD>
+ <TD WIDTH=77%>
+ <P CLASS="western" ALIGN=LEFT>New format/layout</P>
+ </TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P CLASS="western"><BR><BR>
+</P>
+<H1 CLASS="western" STYLE="page-break-before: always">1 Introduction</H1>
+<P CLASS="western">If you know a little about HTML and CSS, then
+you'll find that it's easy to customize the appearance, layout and
+content of your Roller-based weblog. You can change the appearance of
+any of your weblog's pages and add as many new pages as you want. Any
+Roller user can do it through Roller's web-based interface and it's
+all done with Roller's simple and easy-to-use template language. In
+this guide, we'll tell you how. We'll start by explaining how
+Roller's weblog template system works then we'll provide a reference
+to the objects and macros that you can use in your templates.</P>
+<P CLASS="western"><I>NOTE: If you have only AUTHOR or LIMITED
+permissions within a weblog then you won't have access to the
+Preferences->Theme or Preferences->Templates pages and you
+won't be able to change or customize your theme. You need to have
+ADMIN permission within a weblog to be able to do the things
+described in this guide.</I></P>
+<P CLASS="western"><I>NOTE: It is possible for a Roller site
+administrator to disable theme customization. So if you do have ADMIN
+permission in your weblog and you still don't see the
+Preferences->Templates page, perhaps your Roller site does not
+allow customization.</I></P>
+<P CLASS="western"><BR><BR>
+</P>
+<H1 CLASS="western" STYLE="page-break-before: always">2 The Roller
+template system</H1>
+<P CLASS="western" STYLE="margin-bottom: 0in">Each Roller weblog is
+defined by a set of page templates, which you can edit to customize
+the content, layout and appearance of your weblog.
+</P>
+<H2 CLASS="western">2.1 Page templates</H2>
+<P CLASS="western">When you create a new Roller weblog you must pick
+a theme to define the new weblog's appearance and layout. A theme is
+just a small set of templates, where each template contains HTML
+code, template language expressions and macros. What's a template? A
+template for an HTML web page is simply an HTML web page with some
+Velocity code embedded inside. For example, this is a valid Roller
+template, with one Velocity expression:</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><html></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><body></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2>My
+blog is named <B>$model.weblog.name</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><BR>
+</P>
+<P CLASS="western">The string "$model.weblog.name" is a
+template language expression and when Roller displays the template,
+that expression will be replaced with the name of the weblog.</P>
+<P CLASS="western">Note that <B>$model</B> is something special.
+Roller makes a set of objects, known as <I>models</I>, available to
+page templates. In the example above, we see only the $model object,
+but here are others. You'll learn more about models in Section 4 and
+Section 5 provides a complete reference.</P>
+<H2 CLASS="western">2.2 The Velocity template language</H2>
+<P CLASS="western">The simple template language that we use inside
+Roller page templates is called Velocity. It's designed to be simple
+and easy for even non-programmers, but it's also a simple programming
+language. You can set variables, use if-else conditional logic and
+create loops.
+</P>
+<P CLASS="western">For example, this Roller page template will list
+the categories available in your weblog except for the one named
+Music:</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><html></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><body></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2>My
+blog is named <B>$model.weblog.name</B>. These are my categories:<br></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#foreach
+($cat in $model.weblog.categories)</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#if
+($cat.name != "Music")</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>$cat.name</B><br></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><BR>
+</P>
+<P CLASS="western">Velocity also supports the concepts of <I>macros</I>.
+A macro is essentially a Velocity method call. We use them in Roller
+to generate HTML. For example, as illustrated below, to display a
+bookmark folder you first retrieve if from the weblog and second pass
+it to the <FONT SIZE=2><FONT FACE="Courier New">#showBookmarkLinksList()</FONT></FONT>
+macro to display it as an HTML <FONT SIZE=2><FONT FACE="Courier New"><ul></FONT></FONT>
+list.</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><html></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><body></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h2>Blogroll</h2></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#set($rootFolder
+= $model.weblog.getBookmarkFolder("/"))</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showBookmarkLinksList($rootFolder
+false false) </B></FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><BR>
+</P>
+<P CLASS="western">You'll learn more about macros in Section 4 and
+Section 7 provides a complete reference to the standard Roller
+macros. If you want more information on Velocity. the Here are links
+to the User and Reference guides:</P>
+<UL>
+ <LI><P CLASS="western"><A HREF="http://jakarta.apache.org/velocity/docs/user-guide.html">http://jakarta.apache.org/velocity/docs/user-guide.html</A></P>
+ <LI><P CLASS="western"><A HREF="http://jakarta.apache.org/velocity/docs/vtl-reference-guide.html">http://jakarta.apache.org/velocity/docs/vtl-reference-guide.html</A></P>
+</UL>
+<P CLASS="western"><BR><BR>
+</P>
+<P CLASS="western">Now that we've covered the basic concepts of page
+templates and the Velocity template language, let's dig into the
+details of editing templates.</P>
+<P CLASS="western"><BR><BR>
+</P>
+<H1 CLASS="western" STYLE="page-break-before: always">3 Editing and
+creating page templates</H1>
+<P CLASS="western">After you've used Roller <B>Preferences->Themes</B>
+page to customize your weblog theme, you can edit and create page
+templates through the <B>Preferences->Templates</B> page. We'll
+show you how to do that, but first you need to understand how the
+required pages, found in every theme, work together to display a
+weblog.</P>
+<P CLASS="western">Every theme is different, but all themes must have
+two required pages -- pages that you cannot rename or delete. These
+are the <B>Weblog</B> template, which defines the main page of your
+blog, and the <B>_day</B> template, which defines how each day's
+worth of blog entries is displayed on your main page. Some themes
+also have a required page named <B>_css</B> which defines the CSS
+style code used by the weblog.</P>
+<P CLASS="western">First, let's look at a simple Weblog template.
+</P>
+<H2 CLASS="western">3.1 The Weblog template</H2>
+<P CLASS="western">Below is a simple Weblog page that displays all of
+the data that weblog typically contains including recent entries with
+paging to past entries, category link, feed links, a calendar and
+feed auto-discovery. Check the annotations for more detail.</P>
+<P CLASS="western" ALIGN=LEFT><I>Listing 1: a typical Weblog template
+</I>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2><!DOCTYPE
+html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2><html><head>
+ </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><title><B>$model.weblog.name</B>
+: <B>$model.weblogPage.name</B></title> <B>#1</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showAutodiscoveryLinks($model.weblog)
+ #2</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><style
+type="text/css"><B>#includeTemplate($model.weblog
+"_css")</B></style> <B>#3</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2></head>
+ </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2><body>
+ </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2><table
+border="0" align="center" width="95%"></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><tr>
+ </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><td
+class="entries" width="80%" valign="top"></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h1><B>$model.weblog.name</B></h1>
+ <B>#4</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><p
+class="descrip"><B>$model.weblog.description</B></p>
+ </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#set($rootCategory =
+$model.weblog.getWeblogCategory("nil")) #5</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogCategoryLinksList($rootCategory
+false false)</B><br> </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#set($pager =
+$model.getWeblogEntriesPager()) #6</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><div
+class="next-previous"></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#if
+($model.results) #7</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogSearchAgainForm($model.weblog) </B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showNextPrevSearchControl($pager)
+ </B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#else</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showNextPrevEntriesControl($pager)
+ #8</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></div></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntriesPager($pager)
+ #9</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#if
+($model.permalink) #10</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntryComments($entry)
+ </B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntryCommentForm($entry)
+ </B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in"> <FONT FACE="Courier New"><FONT SIZE=2><B>#end</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></td>
+ </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2><td
+width="20%" valign="top"></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h2>Calendar</h2> </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogEntryCalendar($model.weblog
+"nil") #11</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h2>Feeds</h2> </FONT></FONT>
+</P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showAtomFeedsList($model.weblog)
+ #12</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h2>Search</h2></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showWeblogSearchForm($model.weblog
+false) #13</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h2>Links</h2></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#set($rootFolder =
+$model.weblog.getBookmarkFolder("/")) #14</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showBookmarkLinksList($rootFolder
+false false) </B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h2>Navigation</h2></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showPageMenu($model.weblog)
+ #15</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showAuthorMenu(true)
+ #16</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><h2>Referrers</h2></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#set($refs =
+$model.weblog.getTodaysReferrers()) #17</B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium">
+<FONT FACE="Courier New"><FONT SIZE=2><B>#showReferrersList($refs 30
+20) </B></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></td></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"> <FONT FACE="Courier New"><FONT SIZE=2></tr></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2></table></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2></body></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Courier New"><FONT SIZE=2></html></FONT></FONT></P>
+<P STYLE="margin-bottom: 0in; font-weight: medium"><BR>
+</P>
+<P CLASS="western">The above template includes a good mix of Velocity
+expressions and statements. There's a lot going on, so let's explain
+it in detail. Here's the point-by-point breakdown.</P>
+<OL>
+ <OL>
<OL>
- <LI><P CLASS="western"><IMG SRC="roller-template-guide_html_m4016f15a.png" NAME="graphics1" ALIGN=LEFT WIDTH=582 HEIGHT=340 BORDER=0><BR CLEAR=LEFT><FONT SIZE=2><B>Go
- to the Preferences->Theme page.</B><BR>Login to Roller and go
- to your weblog's <B>Preferences->Themes</B> page. Shown below.<BR></FONT><BR><BR>
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>HTML title</B><BR>For the HTML title we use the weblog's name,
+ a colon and the name of the page template that is currently being
+ displayed.</P>
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>Auto-discovery links</B><BR>The <FONT SIZE=2><FONT FACE="Courier New">#showAutodiscoveryLinks()
+ </FONT></FONT>macro adds the HTML <FONT SIZE=2><FONT FACE="Courier New"><link></FONT></FONT>
+ elements required for RSS and Atom feed auto-discovery as well as
+ RSD for weblog clients.</P>
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>Include CSS styles</B><BR>Here we use the include the theme's
+ <B>_css</B> template directly in the page, right inside a pair of
+ <FONT SIZE=2><FONT FACE="Courier New"><style></FONT></FONT>
+ tags.
</P>
- <LI><P CLASS="western"><FONT SIZE=2><B>Pick and save the theme
- you'd like to customize.</B><BR>If you want to customize your
- weblog's current theme, then you can skip this step. If you have't
- decided which theme to customize, then use the preview combo-box
- to pick the theme that you'd like to use as your starting point.
- Once you've picked your theme, click the Save button to save it as
- your current theme.</FONT></P>
- <LI><P CLASS="western"><IMG SRC="roller-template-guide_html_m71a47e4a.png" NAME="graphics2" ALIGN=LEFT WIDTH=370 HEIGHT=94 BORDER=0><BR CLEAR=LEFT><FONT SIZE=2><B>Click
- the Customize button.</B><BR>Click the Customize button to
- customize your theme. When you do this, copies of the themes page
- templates will be copied into your weblog so you can edit them.</FONT></P>
- <LI><P CLASS="western"><FONT SIZE=2><B>Customize your theme by
- editing and creating page templates.</B><BR>Go to the
- Preferences->Templates page, edit your page templates and add
- new ones as needed â as described in the next section.</FONT></P>
- </OL>
- <P CLASS="western">And if you get tired of your customized theme,
- just use the <B>Preferences->Theme</B> page to switch back to a
- shared theme â or pick another one to customize. Now let's
- discuss editing and creating templates.</P>
- <H2 CLASS="western">3.4 - Editing and creating page templates</H2>
- <P CLASS="western">Once you've got the page templates copied into
- your weblog, you can do just about anything you want to your theme.
- You can use the <B>Preferences->Templates</B> page, shown below,
- to create a new page, delete a page or choose a page to edit.</P>
- <P CLASS="western"><IMG SRC="roller-template-guide_html_3be4c6e2.png" NAME="graphics3" ALIGN=LEFT WIDTH=634 HEIGHT=352 BORDER=0><BR CLEAR=LEFT><BR><BR>
- </P>
- <P CLASS="western">Now might be a good time to describe the <I>page
- template properties</I> since you can see them in the table above.
- The properties are name, description, link, navbar and hidden.
- Let's explain each:</P>
- <UL>
- <LI><P CLASS="western"><B>Name</B>: Each template has a name,
- which you can display in your templates. You can also use the
- <FONT FACE="Courier New">#includeTemplate()</FONT> macro to
- include the contents of one page in another, by referring to the
- template by name.</P>
- <LI><P CLASS="western"><B>Description</B>: You can enter an option
- description for each page for display or just as a reminder to
- yourself as to the purpose of the page.</P>
- <LI><P CLASS="western"><B>Link</B>: Each page template has a link
- property, which is used to form the URL for the page. For example,
- if the page's name is âsimpleâ then the page will be available
- at the URL â/page/simpleâ within the weblog.
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>Display a page title</B><BR>Here we use the weblog's name again
+ in an <FONT FACE="Courier New"><h1></FONT> title.</P>
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>Category links list</B><BR>Display a list of weblog category
+ links.</P>
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>Get entries pager</B><BR>Get the entries pager object so we can
+ display entries and a paging control.</P>
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>Show search results control?</B> <BR>Show search results pager
+ control if search in progress</P>
+ <LI><P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium">
+ <B>Else . . .<BR></B>Show normal entries pager control.
</P>
- <LI><P CLASS="western"><B>Navbar</B>: This is a flag that
- indicates whether the page is to be shown in the weblog navigation
- bar that is produced by the <FONT FACE="Courier New">#showPageMenu()</FONT>
- macro.</P>
- <LI><P CLASS="western"><B>Hidden</B>: This is a flag that
- indicates that a page is hidden and not possible to access via
- URL.</P>
- </UL>
- <P CLASS="western"><BR><BR>
- </P>
- <P CLASS="western">For new templates that you add, you'll be able
- to edit all of those properties using the
- <B>Preferences->Template->Edit Template</B> page (shown
- below).</P>
- <P CLASS="western"><BR><BR>
- </P>
- <P CLASS="western"><IMG SRC="roller-template-guide_html_m48cd7d3.png" NAME="graphics4" ALIGN=LEFT WIDTH=633 HEIGHT=437 BORDER=0><BR CLEAR=LEFT><BR><BR>
- </P>
- <P CLASS="western">But the rules for <I>required pages</I> are
- different. The weblog pages named Weblog, _day and _css are
- considered to be required pages. You can change the template code
- for those pages but you cannot edit the name, link or any other
- properties.</P>
- <P CLASS="western">Now that you know how to edit and create page
- templates, let's discuss how to use the models, objects and macros
- that Roller makes available to template authors.</P>
- <P CLASS="western"><BR><BR>
- </P>
- <H1 CLASS="western" STYLE="page-break-before: always">4 - Using
- models, objects and macros</H1>
- <P CLASS="western">Roller makes weblog data available to page
- templates in the form of <I>models</I> and <I>data</I> <I>objects
- </I>and makes it easy for you to generate the HTML for your weblog
- by providing <I>macros</I>.<SPAN STYLE="font-style: normal"> Let's
- explain these new terms.</SPAN></P>
- <UL>
- <LI><P CLASS="western"><A NAME="DDE_LINK5"></A><FONT SIZE=2><B>Model
- objects</B>: Model objects provide access to data from Roller and
- specifically from your Roller weblog. A model object returns data
- objects or collections or data objects. In Section 6, we'll
- describe each model, it's properties and methods.</FONT></P>
- <LI><P CLASS="western"><FONT SIZE=2><B>Data objects</B>: Data
- objects each represent an item of data within your Roller weblog,
- for example there is a <I>Weblog</I> object that represents your
- weblog, <I>WeblogEntry</I> objects which represent individual
- weblog entries and <I>Bookmark</I> objects that represent items in
- your blogroll. In Section 7, we'll describe each data object, it's
- properties and methods.</FONT></P>
- <LI><P CLASS="western"><FONT SIZE=2><B>Macros</B>. A macro is
- Velocity routine that generates HTML based on a data object or a
- collection of data objects. In Section 8 we'll describe each of
- Roller's build-in macros.</FONT></P>
- </UL>
- <P CLASS="western">Let's discuss how to access data via models and
- data objects.</P>
- <H2 CLASS="western">4.1 - Accessing data via models and objects</H2>
- <P CLASS="western">Models and data objects are objects and there
- are two ways to access data from objects. One way is to access an
- objects properties. Another is to call the object's methods. Let's
- talk about these two techniques.</P>
- <H3 CLASS="western">4.1.1 - Accessing object properties</H3>
- <P CLASS="western">To access an objects properties, you use a
- simple dot-notation. For example, if you want to display the Roller
- version number property of the <B>$config</B> model object, you do
- something like this in your page:</P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2> <p><B>$config.rollerVersion</B></p></FONT></FONT></P>
- <P STYLE="margin-bottom: 0in; background: transparent"><BR>
- </P>
- <P CLASS="western">Or, if you'd like to save the Roller version
- number in a variable named $version, you'd do this:</P>
- <P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2><B> #set(
- $version = $config.rollerVersion )</B></FONT></FONT></P>
[... 8120 lines stripped ...]