Re: [WebDNA] hideif within a search
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103126
interpreted = N
texte = Rich Kwas wrote:> I have a search where 2 choices are made from dropdowns.> > Item 1 is a category.> Item 2 lists a website where reviews might be found for listings within that category.> > There currently are 8 choices as well as "All" for that second Item.> > Item 2 is written like this within the db:> +3+50+51+> and so on depending on the site ID etc> > > To show results for "All" as the 2nd choice I've inserted a [hideif] within the search:> > [Search db=^/ihr/ihr.db&eqVisibleDatarq=T&eqPreferredDatarq=No&woSECTIONSdatarq=[cat]&SECTIONSword=ww&namewbrk=+&SKUsort=1&SKUsdir=ra&allhit=1[hideif [reviewsites]=All]&woReviewSitesdatarq=[ReviewSites]&ReviewSitesword=ww&ReviewSiteswbrk=+[/hideif]]> > > This seems to be working fine, but I've never placed a hideif within a search in the past> > > My question.....> Is placing a [hideif] within a search acceptable?> > ...if not is there as easier way to find "All" if indicated in that second Item?> > > I'm using 6.0 on IIS.......> > > ThanksHi Rich, sure, hideif's and any other code are just fine in there... however, you may benefit from the convention of setting a tSearchCriteria variable as follows:[switch value=[tReviewSites]] [case value=ALL] [text]tSearchCriteria=blah blah blah[/text] [/case] [default] [text]tSearchCriteria=Default blah blah[/text] [/default][/switch]Then in the search:[search db=^/your/db.db&[tSearchCriteria]]lastly, depending on what possible values are in [cat] and [reviewsites].. you may want to consider wrapping them in [url][/url]'s in your search criteria.DonovanDonovan BrookeWebDNA Software Corporationhttp://www.webdna.us**[Square Bracket Utopia]**
Associated Messages, from the most recent to the oldest:
Rich Kwas wrote:> I have a search where 2 choices are made from dropdowns.> > Item 1 is a category.> Item 2 lists a website where reviews might be found for listings within that category.> > There currently are 8 choices as well as "All" for that second Item.> > Item 2 is written like this within the db:> +3+50+51+> and so on depending on the site ID etc> > > To show results for "All" as the 2nd choice I've inserted a
[hideif] within the search:> > [Search db=^/ihr/ihr.db&eqVisibleDatarq=T&eqPreferredDatarq=No&woSECTIONSdatarq=[cat]&SECTIONSword=ww&namewbrk=+&SKUsort=1&SKUsdir=ra&allhit=1[hideif [reviewsites]=All]&woReviewSitesdatarq=[ReviewSites]&ReviewSitesword=ww&ReviewSiteswbrk=+[/hideif]]> > > This seems to be working fine, but I've never placed a hideif within a search in the past> > > My question.....> Is placing a
[hideif] within a search acceptable?> > ...if not is there as easier way to find "All" if indicated in that second Item?> > > I'm using 6.0 on IIS.......> > > ThanksHi Rich, sure, hideif's and any other code are just fine in there... however, you may benefit from the convention of setting a tSearchCriteria variable as follows:[switch value=[tReviewSites]] [case value=ALL]
[text]tSearchCriteria=blah blah blah[/text] [/case] [default]
[text]tSearchCriteria=Default blah blah[/text] [/default][/switch]Then in the search:[search db=^/your/db.db&[tSearchCriteria]]lastly, depending on what possible values are in [cat] and [reviewsites].. you may want to consider wrapping them in
[url][/url]'s in your search criteria.DonovanDonovan BrookeWebDNA Software Corporationhttp://www.webdna.us**[Square Bracket Utopia]**
Donovan Brooke
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
File upload (2002)
[protect] on NT? (1997)
All choice in popups (1997)
Initiating NewCart (1997)
Stay on Products page (2003)
StoreBuilder Q's (2003)
Webcatalog Future?!? - Was &fieldsdir=ra truely random?? (2000)
WebCatalog Hosting (1996)
browsername (2002)
Showing unopened cart (1997)
[WebDNA] Redirecting incoming URL request to https page (2018)
Comments in db? (1997)
Hiding words (2000)
RE: Adding a product from another site (1997)
CommitDatabase vs. CloseDatabase (2001)
WebDNA Solutions ... sorry! (1997)
PCS Customer submissions ? (1997)
WebCat2 beta 11 - new prefs ... (1997)
email address scrambling (2002)
Associative lookup style? (1997)