[Zope] Almost there, but I am still having a little problem

2000-10-23 Thread Taco Scargo

Thank you all for helping me out. The hints got me almost there. I have one
unsolved mystery left. What I am trying to do is print the titles from the
DTML Documents in the 'artikelen' folder (and actually another property
called 'inleiding'. I believe the code below should do this, but it does not
work. It returns 'Zope' instead of the title. If I use the 'inleiding'
property it reports that it does not exist. If I just use sequence-item it
returns the complete item ok.

Any clues ?

Thanks,

Taco


http://www.gezondheidskrant.nl:8080/mainframe :

dtml-let articleList="[]"

dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf
dtml-call "articleList.append(_['sequence-item'])"
/dtml-in

dtml-in "articleList[-4:]" reverse
   dtml-let theDocument=sequence-item
   dtml-var "theDocument.title"
   dtml-var "theDocument.inleiding"
   /dtml-let
/dtml-in

/dtml-let





   1stUp.com - Free the Web
   Get your free Internet access at http://www.1stUp.com

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] One last request

2000-10-23 Thread Taco Scargo

I have one unsolved mystery left. What I am trying to do is print the titles
from the DTML Documents in the 'artikelen' folder (and actually another
property called 'inleiding'. I believe the code below should do this, but it
does not work. It returns 'Zope' instead of the title. If I use the
'inleiding' property it reports that it does not exist. If I just use
sequence-item it returns the complete item ok.

Any clues ?

Thanks,

Taco


http://www.gezondheidskrant.nl:8080/mainframe :

dtml-let articleList="[]"

dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf
dtml-call "articleList.append(_['sequence-item'])"
/dtml-in

dtml-in "articleList[-4:]" reverse
   dtml-let theDocument=sequence-item
   dtml-var "theDocument.title"
   dtml-var "theDocument.inleiding"
   /dtml-let
/dtml-in

/dtml-let


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Problems with sequence-item

2000-10-22 Thread Taco Scargo

I get errors when sequence-item is being called to list the contents of a
folder

E.g.
dtml-in "(1,2,3)" reverse
dtml-var sequence-item
/dtml-in

correctly outputs 3 2 1

When I do

dtml-in "folder.objectValues()"
dtml-var id
/dtml-in

it correctly outputs all ids in the folder.

But

dtml-in "folder.objectValues()"
dtml-var sequence-item
/dtml-in

will fail with an error
Error Type: AttributeError
Error Value: __call__

What am I doing wrong ?

Thanks,

Taco Scargo





   1stUp.com - Free the Web
   Get your free Internet access at http://www.1stUp.com

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Problems with sequence-item

2000-10-22 Thread Taco Scargo

Had already tried that, but it doesn't work.
I have 8 DTML Documents in a folder called artikelen.

dtml-in "artikelen.objectValues('DTML Document')"
dtml-var sequence-item
/dtml-in

Fails with the error:
Error Type: AttributeError
Error Value: __call__

I am really clueless

Thanks,

Taco
- Original Message -
From: "Mark N. Gibson" [EMAIL PROTECTED]
To: "Taco Scargo" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, October 22, 2000 3:52 PM
Subject: Re: [Zope] Problems with sequence-item
 In this example, dtml-var sequence-item is actually trying to call the
items
 in the folder.  In this case, at least one of the items is not callable
 like
 another folder).  If you did something like this:

 dtml-in "folder.objectValues('DTML Method')"
 dtml-var sequence-item
 /dtml-in

 You would see the results of 'viewing' or calling every DTML Method in
folder.

 Mark


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problems with sequence-item

2000-10-22 Thread Taco Scargo

Please feel free to look at it at

http://www.gezondheidskrant.nl:8080/mainframe

Taco
- Original Message -
From: "Curtis Maloney" [EMAIL PROTECTED]
To: "Taco Scargo" [EMAIL PROTECTED]; "Mark N. Gibson" [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, October 22, 2000 6:57 PM
Subject: Re: [Zope] Problems with sequence-item
 Any chance you could post the WHOLE traceback, so we might be able to see
 which object it's choking on?


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Help needed with news articles

2000-10-21 Thread Taco Scargo

Unfortunately nobody responded, so I am reposting this question again. I
just need a link to an example or explanation.

Basically I want to create a page listing the last 4 articles from a Zope
folder. The articles need a publish from/to field, title and (dtml) text. I
somehow need to be able to find and display the article from another dtml
document. I read many FAQs and tried working with zcatalogs, but somehow I
am not getting there. It is probably not so difficult. If there is somebody
how can help me or give me a link to a clear explanation or example I would
be very very grateful. Thanks !

Taco


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Help needed with news articles

2000-10-19 Thread Taco Scargo

Basically I want to create a page listing the last 4 articles from a Zope
folder. The articles need a publish from/to field, title and (dtml) text. I
somehow need to be able to find and display the article from another dtml
document. I read many FAQs and tried working with zcatalogs, but somehow I
am not getting there. It is probably not so difficult. If there is somebody
how can help me or give me a link to a clear explanation or example I would
be very very grateful. Thanks !

Taco


___
Zope maillist  -  [EMAIL PROTECTED]
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 )