[Zope-CMF] CMFTopic problem, passing args in DTML, or just brain damage?

Tres Seaver tseaver@digicool.com
Sat, 19 May 2001 00:18:16 -0400 (EDT)


On Fri, 18 May 2001, marc lindahl wrote:
 
> > From: Tres Seaver <tseaver@digicool.com>
> > 
> > Because you were visiting the topic's default view
> > ('topic_view'), with the REQUEST populated with a form variable,
> > 'Subject', set to 'something.  Because you reached 'list' via URL
> > traversal, ZPublisher is helping out by finding some appropriate
> > default method to call on it.
> 
> Interesting!  Where do I look in the source for background?

Products.CMFTopic.Topic.py?  The API for topics which is interesting
at "runtime" is pretty simple:

    def buildQuery(self):
        """ Uses the criteria objects to construct a catalog query. """

     def queryCatalog(self, REQUEST=None, **kw):
        """\
        Call self.buildQuery and augment any passed in query
        before calling the catalog.
        """

> And, do you have a suggestion of how I could do this from a
> DTML method?  I tried <OBJECT
> data="/list?Subject=something"></OBJECT>, that didn't work...

Products.CMFTopic.skins.topic.topic_view uses DTML like the
following::

  <dtml-in expr="list.queryCatalog( Subject='foo' )"> 
   ...
  </dtml-in>
 
> The background of this is, I'm interested in using CMFTopic as
> a sort of tree to get lists of stuff on the site, progressively
> refined.  But I have a group of subjects which act as
> 'modifiers' so they are at the leaves of every branch.  A pain
> to construct, so I though I could leave off the leaves and use
> that question mark business... which works great from a URL.

Hmm, I'm not sure how Topics map onto that problem.  Maybe Ken
will dive in here -- he was advocating such a usage pattern this
afternoon.

> Otherwise, I'm about to give up on CMFTopic for this purpose,
> and just do my own catalog queries.  Not a big deal, really...
> news_box is the example I'm following.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org