[Zope] Tree tag and SQL methods?

Alexander Staubo alex@mop.no
Sat, 26 Jun 1999 15:36:27 +0200


Doesn't improve anything: While the "second" part of the query -- the
one that's supposed to collect the leaf articles -- clearly executes, no
data is displayed. Only the first level -- the publications list -- is
rendered, with "plus" icons. Clicking on the icon runs the query but no
data is there.

This is 1.11.0pr1, though, so maybe the problem is related to this
release. I wish I could say I was working with 2.0.0a3, but if you've
followed my last few posts you know why I can't. :-)

--
Alexander Staubo             http://www.mop.no/~alex/
"What the hell, he thought, you're only young once, and threw
himself out of the window. That would at least keep the element of
surprise on his side."
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_

>-----Original Message-----
>From: Phillip J. Eby [mailto:pje@telecommunity.com]
>Sent: 26. juni 1999 15:02
>To: Alexander Staubo; Zope Mailing List (E-mail)
>Subject: RE: [Zope] Tree tag and SQL methods?
>
>
>Same problem as before.  Try:
>
><!--#with "_.namespace(pub='')"-->
><!--#tree branches_expr="Query(pub=pub)"-->
><!--#/tree-->
><!--#/with-->
>
>And have Query return the "select distinct" of publications as
>'pub' if the
>pub parameter is '', otherwise return the titles for that
>publication, and
>return pub as some value that will result in no results if fed
>back into
>the query.
>
>
>At 07:43 PM 6/25/99 +0200, Alexander Staubo wrote:
>>I haven't tested this yet, but it seems sound; I'll let you know if it
>>doesn't. :-)
>>
>>Now perhaps you can assist in another similar case with the #tree tag.
>>
>>Basically I have a two-level hierarchy of (simplified) articles and
>>their home publication. The article database might be something like
>>this:
>>
>>	Title:	Publication:
>>	Foo	Bar Mag
>>	Bar	Fnargh Times
>>	...
>>
>>I seek to render a "tree" where the publication is the tree node, and
>>the list of articles (by their title) are listed under each node. A
>>little like the "Quick Start" thing. Click on the "plus" icon
>beside the
>>publication and you get a (non-tree) list of articles. Actually I get
>>this is, strictly speaking, a one-level hierarchy.
>>
>>While this structure is simple enough that could stay clear
>of using the
>>#tree tag, I'd still like to try. I tried:
>>
>><!--#tree expr="Query()" leaves="Leaf"-->
>>  <!--#var Publication--><br>
>><!--#/tree-->
>>
>>thinking that Query() would return the publications, and each
>>publication would use the DTML Method Leaf to render its contents, but
>>no. What am I missing?
>