Re: Pretty Easy I bet
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 35171
interpreted = N
texte = a var will only equal null when assigned that value - either on purpose via form var (that includes passed in URLs), or from if you getting a dbfield value where that field has no text in it yet (this includes orderfile headers).If a var is unititialized (not given a value by any means, then it's value = [var].[showif [URL][var1][/URL]=[URL][raw][var1][/raw][/URL]]var1 has not been initialized (if that is the right terminology... ie var1 hasnot been assigned a value[/showif]If you are using the XML webcat tags and parser then an unititialized var = undefined (I think. Someone correct me if I am wrong).Always take note if the var is potentially getting its value from: 1) a db field (incl. ordefile header) , or else 2) other means like formvar,[math], [text] , etc.HTH-Johnchas wrote:> Hi>> Search Page:>> I have a search page with 2 contexts>> one displays by a product Category>> one displays by Company>> Results Page>> I have two search contexts>> one shows results of the Category selection>> one shows results of the Company selection>> They both work, but>> I want to hide/show the empty search table and its founditems.>> I have put on the results page to test.....>> category = [category]>> company= [company]>> the context I want to hide = [fieldname] either the [Company] or the [Category] - not a value>> so I have tried:>> [showif [company]=[company]]>> for the category search results>> and>> [hideif [company]!]>> to test the null and therefore hide that context.> What am I missing?>> Thanks In Advance>> Charley Conquest>> results.tpl below>> > > >
Results of Your Search> >> [Include file=HSI_Header.inc]>>
>
> Category = [category]>
>
> company = [company]>> [showif [category]=[category]]> [search db=products.db&eqCategorydata=[url][Category][/url]&asCategorysort=1&asCompanysort=2&max=10&startat=[url][startat][/url]]>>
Your search for [Category] found [numFound] items
>>
> Only the first 100 characters of product descriptions are displayed.
> To see a complete product description and a picture (if available) click on the Detail hypertext link.
>>
>> > Company | Title | Description | Price | Actions | >
>> [foundItems]> > [Company] | > [title] | > [description] | > $[format .2f][price][/format] | > Add to Cart | > Detail | >
> [/foundItems]>>
>> [shownext]>
Show Items [start]-[end]> [/shownext]>
>> [/search]>> [/showif]>> [showif [company]=[company]]> [search db=products.db&eqCompanydata=[url][Company][/url]&asCompanysort=1&max=10&startat=[url][startat][/url]]>>
Your search for [hideif [category]!Strings]'[Category]'[/hideif] [hideif [category]=Strings]'[COMPANY]'[/hideif] found [numFound] items
>>
> Only the first 100 characters of product descriptions are displayed.
> To see a complete product description and a picture (if available) click on the Detail hypertext link.
>>
>> > Company | Title | Description | Price | Actions | >
>> [foundItems]> > [Company] | > [title] | > [description] | > $[format .2f][price][/format] | > Add to Cart | > Detail | >
> [/foundItems]>>
>> [shownext]>
Show Items [start]-[end]> [/shownext]>
>> [/search]> [/showif]>>
Show Shopping Cart>
Back To Search>> >