[Zope] Why can't this be done???

Jochen Haeberle listen@MIDRAS.de
Tue, 7 Dec 1999 09:44:33 +0100


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>