[Zope] How do I call a method that resides in a child folder?

Danny William Adair danny@adair.net
Tue, 28 Aug 2001 14:22:49 +1200


At 00:16 28/08/2001 +0100, Norman Khine wrote:
>Hi,
>I am trying out the SQLPoll product and have the following setup.
>[+] MainFolder
>     index_html
>     MySQL database
>     [+]SQLPoll (SQL Poll folder)
>        ....methods
>        index_html (displays all the questions) <--(2)
>        vote_big_html
>
>now I want to create on my root index_html, something like a slashdot
>pollbox based on the vote_big_html page, but only showing one question.
>
>how do I call indez_html (2) from the root index_html page?

Doesn't one of these work?

1. <dtml-with "SQLPoll"><dtml-var index_html></dtml-with>
(I've put SQLPoll in double quotes here so it doesn't render (just in case 
it would).
If it's a plain vanilla folder it won't and you can leave it unquoted)

2. <dtml-var "SQLPoll.index_html(_.None, _)">
(This time we should pass client and namespace, cos index_html is inside a 
python expression)

hth
and doesn't look too confusing,
be sure to check out the docs and mailing list archives for "DTML namespace"

Danny