I used a Z class to write a basic news pinup board for my site. Everything is working fine but I reached a point where I am trying to publish only the heading and a summary of the message while asking users to click on a link to view the body of the message
I have created a newster class which is my news server instance. The newster class contains the messages class which is the blueprint for each of the messages that I am going to add. Each message is an object in the newster directory.
The message objects each have a number of properties such as expired, title, id, summary and body.
I have two methods:
1. index_html that prints the title and summary of each message instance one after the other on a long page.
2. display_body that will print the body of the message in a new window.
The problem:
I pass the id of the message whose body must be displayed in a url like: display_body?document_id=<id>
Here is what I believe the basic code of the display_body method should be:
<dtml-var standard_html_header>
<dtml-with REQUEST>
<dtml-with expr="document_id">
<dtml-var body>
</dtml-with>
</dtml-with>
<dtml-var standard_html_footer>
I can print the document_id as a dtml-var but somehow I cannot get zope to understand it is the name of an object whose body property I want to display.
But, somehow, zope does not push the properties of the document_id (which it received through the web) on top of the namespace and therefore it believes that there is no such thing as a body property.
Any help will be greatly appreciated. This is driving me nuts.
Thanks,
Pieter