Hi, please forgive my probabyl stupid questions... but I am doing my first steps in Zope and unfortunately, I do not have an python background. I am working on a Newssystem. Editors are going to publish articels, related materials and pictures and are given the choice to add a poll and/or a discussion to their articel. I wanted to include the main discussion page of ZDiscussion or the included ZDConfera on the page of the articel itself, not just link to it. Therefore I created a folder for my articel, and put a ZDiscussion topic, named disc, inside. In my article page, I tried <dtml-with disc> <dtml-var index_html> </dtml-with> This gives a key error even the most simplest form (although I doubt this should work correctly) <dtml-var disc.index_html> does return an error. Why is the ZDiscussion folder something special??? What's wron about my tries? Is there a way to do what I want? Jochen
On Mon, Dec 06, 1999 at 06:48:30PM +0100, Jochen Haeberle wrote:
Hi,
please forgive my probabyl stupid questions... but I am doing my first steps in Zope and unfortunately, I do not have an python background.
I am working on a Newssystem. Editors are going to publish articels, related materials and pictures and are given the choice to add a poll and/or a discussion to their articel.
I wanted to include the main discussion page of ZDiscussion or the included ZDConfera on the page of the articel itself, not just link to it. Therefore I created a folder for my articel, and put a ZDiscussion topic, named disc, inside. In my article page, I tried
<dtml-with disc> <dtml-var index_html> </dtml-with>
This gives a key error Try <dtml-with "PARENTS[0].disc"> <dtml-var index_html> </dtml-with>
even the most simplest form (although I doubt this should work correctly)
<dtml-var disc.index_html>
<dtml-var> that way looks the variable name LITERALLY. Instead, you want to do something like this: <dtml-var "PARENTS[0].disc.index_html"> Also, are you sure that the index_html exists?
does return an error. Why is the ZDiscussion folder something special??? What's wron about my tries? Is there a way to do what I want?
Jochen
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope No cross posts or HTML encoding! (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org
Stephen, thanks for your tip! This makes things a bit better... at least no error and parts of the included page do show up... but all the posted messages are missing !?! So it's the following code (copied from the included page) that's not working:
<dtml-if children> <dtml-tree branches="children"> <a href="&dtml-absolute_url;"><dtml-var title></a> by <a href="mailto:&dtml-email;">&dtml-author;</a> on <dtml-var created fmt=aCommon> </dtml-tree> <dtml-else> <p>This discussion is empty.</p> </dtml-if>
The dml-if does not give any result, not even the else-branch... and there are messages. If the included page alone is viewed, this code works just fine... Is this correct behaviour? Would you please be so kind to explain what your tip using <dtml-with "PARENTS[0].disc"> does? Is this sort of stepping up to the parent folder and then down again to disc? Why is this different from <dtml-with disc>? Jochen At 15:36 Uhr -0600 06.12.1999, Stephen Pitts wrote:
On Mon, Dec 06, 1999 at 06:48:30PM +0100, Jochen Haeberle wrote:
Hi,
please forgive my probabyl stupid questions... but I am doing my first steps in Zope and unfortunately, I do not have an python background.
I am working on a Newssystem. Editors are going to publish articels, related materials and pictures and are given the choice to add a poll and/or a discussion to their articel.
I wanted to include the main discussion page of ZDiscussion or the included ZDConfera on the page of the articel itself, not just link to it. Therefore I created a folder for my articel, and put a ZDiscussion topic, named disc, inside. In my article page, I tried
<dtml-with disc> <dtml-var index_html> </dtml-with>
This gives a key error Try <dtml-with "PARENTS[0].disc"> <dtml-var index_html> </dtml-with>
Add a "Z search interface" and select your ZDiscussion instance as the searchable object. View the search interface, remove the things it complains about. It think you will understand how to use it now...? /Magnus
please forgive my probabyl stupid questions... but I am doing my first steps in Zope and unfortunately, I do not have an python background.
I am working on a Newssystem. Editors are going to publish articels, related materials and pictures and are given the choice to add a poll and/or a discussion to their articel.
I wanted to include the main discussion page of ZDiscussion or the included ZDConfera on the page of the articel itself, not just link to it. Therefore I created a folder for my articel, and put a ZDiscussion topic, named disc, inside. In my article page, I tried
<dtml-with disc> <dtml-var index_html> </dtml-with>
This gives a key error
even the most simplest form (although I doubt this should work correctly)
<dtml-var disc.index_html>
does return an error. Why is the ZDiscussion folder something special??? What's wron about my tries? Is there a way to do what I want?
participants (3)
-
Jochen Haeberle -
Magnus Heino -
Stephen Pitts