[Zope] Stupid question? :)

Stephen Hansen stephen@myseraph.org
Tue, 17 Jul 2001 02:14:43 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_0015_01C10E66.3E180860
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

    Alriiighty. What i'm wanting to do is to put up a 'news' table for =
the side of my page -- think, www.zope.org -- 'News'? :)

    The way I have it set up is a News/ subfolder, with an Items/ folder =
beneath it that has a group of dtml documents in the format of =
YY-MM-DD.SS, with a title that describes what the news is about. SS is a =
serial number, btw, in case there's more then one news in a day.

   Now, the News/content_html method should basically build a list, and =
transform the id into "MM/DD/20YY (#SS) title". How do I do that? :) =
Being a zope-newbie, I tried the following:
---------------
<ul>
  <dtml-in expr=3D"Items.objectValues()">
    <li><dtml-eval>
      anchor_text =3D ":%s:%s/%s/20%s (#%s) %s" % ( id,id[3:5], id[6:8], =
id[0:2], id[-2:], title)
</dtml-eval><dtml-var anchor_text>
  </dtml-in>
</ul>
----------
...except id is apparently not a string, nor something sliceable... what =
do I dooo? :)

Thanks in advance!

--Stephen


=20

http://www.myseraph.org/

------=_NextPart_000_0015_01C10E66.3E180860
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 5.50.4613.1700" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Alriiighty. What i'm =
wanting to=20
do is to put up a 'news' table for the side of my page -- think, <A=20
href=3D"http://www.zope.org">www.zope.org</A> -- 'News'? :)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; The way I have it =
set up is a=20
News/ subfolder, with an Items/ folder beneath it that has a group of =
dtml=20
documents in the format of YY-MM-DD.SS, with a title that describes what =
the=20
news is about. SS is a serial number, btw, in case there's more then one =
news in=20
a day.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; Now, the News/content_html =
method=20
should basically build a list, and transform the id into "MM/DD/20YY =
(#SS)=20
title". How do I do that? :) Being a zope-newbie, I tried the=20
following:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;ul&gt;<BR>&nbsp; &lt;dtml-in=20
expr=3D"Items.objectValues()"&gt;<BR>&nbsp;&nbsp;&nbsp;=20
&lt;li&gt;&lt;dtml-eval&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
anchor_text =3D=20
":%s:%s/%s/20%s (#%s) %s" % ( id,id[3:5], id[6:8], id[0:2], id[-2:],=20
title)<BR>&lt;/dtml-eval&gt;&lt;dtml-var anchor_text&gt;<BR>&nbsp;=20
&lt;/dtml-in&gt;<BR>&lt;/ul&gt;</FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial>----------</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial>...except id is apparently =
not&nbsp;a string,=20
nor something sliceable... what do I dooo? :)</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial></FONT></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT face=3DArial>Thanks in =
advance!</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>--Stephen</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><FONT face=3DArial size=3D2>&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.myseraph.org/">http://www.myseraph.org/</A></FONT></DI=
V></BODY></HTML>

------=_NextPart_000_0015_01C10E66.3E180860--