[Zope-CMF] DTML, RSS customization and my incompetency...
Dmitry S. Makovey
dmitry at athabascau.ca
Tue Aug 24 12:08:50 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi everybody,
I'm playing with RSS feeds in Plone (actually those are scripts from CMF
unaltered) and what I was trying to do is make RSS feeds more flexible.
Usecase:
I need link objects in RSS feed to come up with link they point to and not
link to the object itself. Let's say I have Link:
id: my_link
title: moo link
remote_url: http://some.com
as itemRSS renders it:
- --------snippet from RSS-------
<item rdf:about="http://localhost:8080/hc/my_folder/my_link">
<title>moo link</title>
<link>http://localhost:8080/hc/my_folder/my_link</link>
<description>desc</description>
<dc:publisher>No publisher</dc:publisher>
<dc:creator>dimon</dc:creator>
<dc:rights></dc:rights>
<dc:date>2004-08-23T14:38+00:00</dc:date>
</item>
- --------end of snippet from RSS-------
And I want:
- --------snippet from RSS-------
<item rdf:about="http://localhost:8080/hc/my_folder/my_link">
<title>moo link</title>
<link>http://some.com</link>
<description> desc </description>
<dc:publisher>No publisher</dc:publisher>
<dc:creator>dimon</dc:creator>
<dc:rights></dc:rights>
<dc:date>2004-08-23 14:38:16</dc:date>
</item>
- --------end of snippet from RSS-------
What I did:
in rssBody there's statement:
...
itemRSS(obj)
...
so I created my class MyLink with method itemRSS rendering it differently and
I changed a call to:
...
obj.ItemRSS()
...
but that brought some errors with non-customized types:
....
KeyError: 'Identifier'
....
Anybody has any idea what's going on? And can anybody show me right direction
(I don't want to put more logic in itemRSS - I'd like to make it per-type
customizable)?
P.S.
Also rssBody doesn't really care for state of the documents which worries me
somewhat.
- --
Dmitry Makovey
Web Systems Administrator
Athabasca University
(780) 675-6245
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQFBK2gSyDrVuGfS98QRAlINAJ9optLGVWmQo0hlEtIL2QQj4qJFvgCfdG/c
EjKFvEb0YCU83pFQqN6M/Pk=
=5F3e
-----END PGP SIGNATURE-----
More information about the Zope-CMF
mailing list