Hi I need help with dtml syntax... I have the following line before a dtml-in on a catalog: <dtml-call "REQUEST.set('Verified','on')"> I want to be able to list only items where Verified is not set to 'on' The default value of verified is no value at all. If I say: <dtml-call "REQUEST.set('Verified','')"> (empty value) I get everything. How does one say Verified = to NOT 'on' in dtml?
Sean Kelley wrote:
Hi I need help with dtml syntax...
...learn ZPT ;-)
I have the following line before a dtml-in on a catalog: <dtml-call "REQUEST.set('Verified','on')"> I want to be able to list only items where Verified is not set to 'on' The default value of verified is no value at all. If I say: <dtml-call "REQUEST.set('Verified','')"> (empty value) I get everything. How does one say Verified = to NOT 'on' in dtml?
This has nothing to do with DTML, it is a catalog question. If 'Verified' can either be '' or 'on', then your search can be achieved with: your_catalog(Verified=('',)) ...or: REQUEST.set('Verified',('',)) ...but I don't like seeing that. Doing that polutes the REQUEST and is rarely necessary or a good idea. cheers, Chris
Great, the last "polluted" choice works well. I really do need to spend some time with ZPT. Thanks for the quick and functional response now. Sean Chris Withers wrote:
Sean Kelley wrote:
Hi I need help with dtml syntax...
...learn ZPT ;-)
I have the following line before a dtml-in on a catalog: <dtml-call "REQUEST.set('Verified','on')"> I want to be able to list only items where Verified is not set to 'on' The default value of verified is no value at all. If I say: <dtml-call "REQUEST.set('Verified','')"> (empty value) I get everything. How does one say Verified = to NOT 'on' in dtml?
This has nothing to do with DTML, it is a catalog question. If 'Verified' can either be '' or 'on', then your search can be achieved with:
your_catalog(Verified=('',)) ...or: REQUEST.set('Verified',('',)) ...but I don't like seeing that. Doing that polutes the REQUEST and is rarely necessary or a good idea.
cheers,
Chris
Sean Kelley wrote at 2002-12-26 19:41 -0800:
I need help with dtml syntax... I have the following line before a dtml-in on a catalog: <dtml-call "REQUEST.set('Verified','on')"> I want to be able to list only items where Verified is not set to 'on' The default value of verified is no value at all. If I say: <dtml-call "REQUEST.set('Verified','')"> (empty value) I get everything.
How does one say Verified = to NOT 'on' in dtml? ZCatalog wants to do the right thing with search forms with several fields. It wants to interprete an empty field as "ignore this field".
Because of this, it forgets about subqueries where the query value is ''. Chris already told you about a workaround... Dieter
participants (3)
-
Chris Withers -
Dieter Maurer -
Sean Kelley