Hi This is my problem: I try to make a application like the guest book (se http://www.zope.org/Documentation/Books/ZopeBook/current/SimpleExamples.stx) and I would like to be able to display only one entry at a time. I use this code to list alle entries (index_html) ----------------------------------------------------------------------- <dtml-var standard_html_header> <h2><dtml-var document_title></h2> <p> <table> <tr> <th>Tidspunkt</th> <th>Overskrift</th> <th>Forfatter</th> </tr> <dtml-in expr="objectValues('DTML Document')" sort="bobobase_modification_time" reverse> <tr> <td><b><dtml-var bobobase_modification_time fmt="%Y-%m-%d %H:%M"></b></td> <td><a href="ShowNews?file=<dtml-var id>"><dtml-var title></a></td> <td>(<dtml-var brukernavn html_quote null="">)</td> </tr> </dtml-in> </table> <dtml-var standard_html_footer> ----------------------------------------------------------------------- The ShowNews DTML-Method (so far just a test): ----------------------------------------------------------------------- <dtml-var standard_html_header> <dtml-var expr="REQUEST.file"><br> <dtml-with expr="REQUEST.file"> Title: <dtml-var title><br> Id : <dtml-var id><br> </dtml-with> <dtml-var standard_html_footer> ----------------------------------------------------------------------- There is one DTML-Document named "entry_1037698423", with title, and another property value named brukernavn (with a value of course). If i display index_html, and select the entry with id entry_1037698423 the result is this: entry_1037698423 Title: Entry_1037698423 Id : news ("news" is the name of the directory). How do I get the title and other properties, as well as the content of the DTML-Document? On Fri, 2003-01-17 at 21:51, Dieter Maurer wrote:
FFFHans Sandsdalen wrote at 2003-1-17 09:58 +0100:
... <dtml-var expr="REQUEST.file"><br>
<dtml-with expr="REQUEST.file"> Title: <dtml-var title><br> Id : <dtml-var id><br> ... and that way I am able to get the file name. But there are some errors in my code, because the output is not what I expexted:
entry_1037698423 Title: Entry_1037698423 Id : news
The entry_1037698423 file has a title, and the id should be the same as <dtml-var expr="REQUEST.file">. I expect, "REQUEST.file" is a "ZPublisher.HTTPRequest.FileUpload" instance (a file you have uploaded)?
In this case, it has neither an id nor a title. You get the one from the enclosing context.
Dieter
-- / hans - http://go.to/tusenfrydveien32 / http://www.spacetec.no/~hans/dfood.htm /--------------------------------------------- / HANS = High Availability No Superman