[ZWeb] DISCUSS: Simplifying home page
Paul Everitt
paul@eurozope.org
Mon, 11 Nov 2002 11:25:44 +0100
Howdy. Over the years, the structure of the zope.org templates has
gotten a little baroque. IMO, in a couple of places we overdose on the
ability to program everything, generating 100x complexity and 10x
performance hit to save 3x typing.
Case in point. I'm about to change the spotlight on the home page.
Fortunately I know where to look, because it isn't very clear how to
find the spotlight.
Here's the DTML that generates that little box:
<dtml-with Documentation>
<dtml-with Articles>
<dtml-with expr="_.getitem(current)">
<TR>
<TD WIDTH="1" BGCOLOR="#6699CC" ROWSPAN="2"><IMG
SRC="Images/spacer.gif" WIDTH="1" HEIGHT="1" BORDER="0"></TD>
<TD VALIGN="TOP" CLASS="righttitle"><H2 CLASS="righttitle"><a
CLASS="righttitle" href="&dtml-absolute_url;"><dtml-var
title></a></TD>
</TR>
<TR>
<TD VALIGN="TOP">
<p>
<dtml-comment>
<dtml-if photo_url>
<dtml-var expr="_.getitem(photo_url).tag(align='right')">
</dtml-if>
</dtml-comment>
<b>By <dtml-var Author><br>
<dtml-var bobobase_modification_time
fmt="%d %B, %Y"></b><br>
<dtml-var Description fmt="structured-text"></p>
<br><a href="&dtml-absolute_url;" class="welcomelink">More...</a>
</dtml-with>
</dtml-with>
</dtml-with>
The with/with/with is, ostensibly, to "automate" the torrential
downpour of spotlights we process. :^) I propose to do away with every
single bit of dynamicism in that block and instead be completely
literal. Thus, in the future, when you want to change the spotlight,
you edit the home page.
Is that ok?
--Paul