CMFTopic problem, passing args in DTML, or just brain damage?
If I create a CMFTopic in the root called 'list', why does this work: http://servername.com/list?Subject=something ...giving me whatever my criterion is, narrowed by matching Subject='something' ...when calling the thing in DTML: list(_.None,_,Subject='something') doesn't seem to recognize the parameter? (and, I've tried many variations, wrapping with a dtml-with, passing 'list' instead of _ or _.None, passing a dict {'Subject':'something'}, all the same result) what am I missing?
marc lindahl wrote:
If I create a CMFTopic in the root called 'list', why does this work:
http://servername.com/list?Subject=something
...giving me whatever my criterion is, narrowed by matching Subject='something'
...when calling the thing in DTML:
list(_.None,_,Subject='something')
doesn't seem to recognize the parameter? (and, I've tried many variations, wrapping with a dtml-with, passing 'list' instead of _ or _.None, passing a dict {'Subject':'something'}, all the same result)
what am I missing?
That signature is the signature of a DTML Method; your 'list' object is a Topic, which isn't directly callable. Try: <dtml-in expr="list.queryCatalog( Subject='something' )"> Tres. -- =============================================================== Tres Seaver tseaver@digicool.com Digital Creations "Zope Dealers" http://www.zope.org
Still, I'm confused, then why would that url (...list?Subject='something') work at all? By signature you mean list(_.None,_) ?
That signature is the signature of a DTML Method; your 'list' object is a Topic, which isn't directly callable. Try:
<dtml-in expr="list.queryCatalog( Subject='something' )">
Tr
On Fri, 18 May 2001, marc lindahl wrote:
Still, I'm confused, then why would that url (...list?Subject='something') work at all?
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.
By signature you mean list(_.None,_) ?
Right -- signature is name of the function, plus arguments and return type. In this case, since 'list' is not callable, I'm surprised you didn't get a TypeError. Tres. -- =============================================================== Tres Seaver tseaver@digicool.com Digital Creations "Zope Dealers" http://www.zope.org
participants (3)
-
marc lindahl -
Tres Seaver -
Tres Seaver