Re: [WebDNA] maybe silly suggestion? [founditems]

This WebDNA talk-list message is from

2015


It keeps the original formatting.
numero = 111903
interpreted = N
texte = For what it is worth, this is the approach I have always used. > On Jan 15, 2015, at 2:54 PM, Terry Wilson wrote: >=20 > Or just put the search parameters in a variable up top to retrieve as need= ed with showifs. This is quite handy for repurposing found items loops, such= as a nicely formatted table of info that is sorted by various fields (just d= iscussed this a few days ago). This has the added benefit of letting you kee= p constants like eventdatetype=3Ddate, max=3D25, etc in the actual search co= de to keep your parameters easier to read and manage. This would certainly p= ut your controller logic separate from your display code. >=20 > [showif [somesearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&blahbl= ahblah[/text][/showif] > [showif [someothersearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&b= lahblahblah[/text][/showif] >=20 > [search [searchforwhat]&max=3D25&lastnamesort=3D1] >=20 >>=20 >>=20 >>> On Jan 14, 2015, at 2:57 PM, Brian Burton wrote: >>>=20 >>> to help separate my controller logic from my display code it would be aw= esome to have a shortcut like: >>> [search db=3Dallthethings.db&blahblahblah][savefounditems name=3Dpeoplen= ameddave][/search] >>>=20 >>>=20 >>>=20 >>>=20 >>> then later in the page, where i=E2=80=99m rendering the html >>> [displayfounditems use=3Dpeoplenameddave] html things [/displayfounditem= s] >>>=20 >>>=20 >>>=20 >>> I know it looks like it=E2=80=99s not saving that much code, but I can s= ee switching which search I want in the controller, and still being able to u= se a universal founditems loop lower in the code. Also the ability to reuse s= earch results (if needed) without doing the same search again.=20 >>>=20 >>> ok, feel free to start telling me how you can do this with a table (you=E2= =80=99re missing the point) or how we don=E2=80=99t need more tags or whatev= er :)=20 >>>=20 >>>=20 >>> -Brian B. Burton >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  2. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  3. Re: [WebDNA] maybe silly suggestion? [founditems] (Michael Davis 2015)
  4. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  5. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  6. Re: [WebDNA] maybe silly suggestion? [founditems] (Stuart Tremain 2015)
  7. Re: [WebDNA] maybe silly suggestion? [founditems] (Dan Strong 2015)
  8. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  9. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  10. Re: [WebDNA] maybe silly suggestion? [founditems] (Dan Strong 2015)
  11. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  12. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  13. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  14. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  15. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  16. Re: [WebDNA] maybe silly suggestion? [founditems] (Dan Strong 2015)
  17. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  18. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  19. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  20. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  21. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  22. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  23. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  24. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  25. Re: [WebDNA] maybe silly suggestion? [founditems] (Stephen Reiss 2015)
  26. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  27. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  28. Re: [WebDNA] maybe silly suggestion? [founditems] (Lawrence Banahan 2015)
  29. Re: [WebDNA] maybe silly suggestion? [founditems] ("Psi Prime Inc, Matthew A Perosi " 2015)
  30. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  31. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  32. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  33. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  34. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  35. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  36. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  37. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  38. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  39. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  40. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  41. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  42. [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
For what it is worth, this is the approach I have always used. > On Jan 15, 2015, at 2:54 PM, Terry Wilson wrote: >=20 > Or just put the search parameters in a variable up top to retrieve as need= ed with showifs. This is quite handy for repurposing found items loops, such= as a nicely formatted table of info that is sorted by various fields (just d= iscussed this a few days ago). This has the added benefit of letting you kee= p constants like eventdatetype=3Ddate, max=3D25, etc in the actual search co= de to keep your parameters easier to read and manage. This would certainly p= ut your controller logic separate from your display code. >=20 > [showif [somesearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&blahbl= ahblah[/text][/showif] > [showif [someothersearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&b= lahblahblah[/text][/showif] >=20 > [search [searchforwhat]&max=3D25&lastnamesort=3D1] >=20 >>=20 >>=20 >>> On Jan 14, 2015, at 2:57 PM, Brian Burton wrote: >>>=20 >>> to help separate my controller logic from my display code it would be aw= esome to have a shortcut like: >>> [search db=3Dallthethings.db&blahblahblah][savefounditems name=3Dpeoplen= ameddave][/search] >>>=20 >>>=20 >>>=20 >>>=20 >>> then later in the page, where i=E2=80=99m rendering the html >>> [displayfounditems use=3Dpeoplenameddave] html things [/displayfounditem= s] >>>=20 >>>=20 >>>=20 >>> I know it looks like it=E2=80=99s not saving that much code, but I can s= ee switching which search I want in the controller, and still being able to u= se a universal founditems loop lower in the code. Also the ability to reuse s= earch results (if needed) without doing the same search again.=20 >>>=20 >>> ok, feel free to start telling me how you can do this with a table (you=E2= =80=99re missing the point) or how we don=E2=80=99t need more tags or whatev= er :)=20 >>>=20 >>>=20 >>> -Brian B. Burton >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Stephen Reiss

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:

Thanks Grant (1997) Pithy questions on webcommerce & siteedit (1997) Memory leak with text variables (1998) Help with Repost Data msg from form (1997) problem with [include] and Web*/SSL 3.0.1 (1998) Bad Cookie / Internet Option / Internet Explorer (2004) webcat nt (1997) My slower response (1997) WC2b12: Yes, Formulas.db is for real (1997) problems with 2 tags (1997) More on the email templates (1997) image magick (2003) bypassing typo's (1998) WebCat2: Items xx to xx shown, etc. (1997) Banners (1997) Authenticate (1997) Country & Ship-to address & other fields ? (1997) Problem displaying search result (1997) WebCatalog for guestbook ? (1997) [WebDNA] Processor Maxing out (2010)