[Zope] Newbie - ZCatalog expression from REQUEST object?
Fri, 5 Jul 2002 14:50:35 -0700
It is indeed a commonly asked question. It comes in many flavors. The answer
is you cannot expand dtml tags within dtml tags. So stuff like:
<dtml-in expr="...<dtml-var other>">
won't work because the expression in quotes is python code, not DTML. You
can still get to your data. Try
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]On Behalf Of
> Lonnie Maynard
> Sent: Friday, July 05, 2002 2:25 PM
> To: firstname.lastname@example.org
> Subject: [Zope] Newbie - ZCatalog expression from REQUEST object?
> I have what is quite probably a stupid newbie question and apologize in
> advance. I have configured a ZCatalog with custom indexes and
> wish to do a
> relatively simple search on that catalog via the code below.
> <dtml-in expr="Catalog(start_date=ZopeTime(),
> com_search='<dtml-var name=searchterm>'
> start_date is used to limit returned items to those that have a
> earlier than today, end_date is used to limit returned items to
> those that
> have an end_date later than today. Both of those work. My issue
> is passing
> the Request object searchterm. It is in the namespace, as I can
> show the var
> above the dtml-in line.
> I have tried 1. <dtml-var searchterm>
> 2. <dtml-var name="searchterm"> (I get invalid
> attribute name)
> 3. <dtml-var name=searchterm>
> 1 and 3 return no results, and #2 gives me invalid attribute
> name. It looks
> as if I have bad syntax but I do not know where. Any help would
> be greatly
> appreciated. Thanks in Advance. Lonnie Maynard
> Zope maillist - Zope@zope.org
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-dev )