Re: contextual shownext

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16167
interpreted = N
texte = On 2/21/98 8:57 AM, Bob Minor so noted...>>I think I might be able to help you, but I don't really understand what >>you want. What do you consider a contextual shownext? > >something like this: > >[search db=my.db&geskudata=0] >[founditems] >[sku][name]
>[/founditems] >(then I want 2 tags that say show previous and next 10 items) >ie >previous 10 next 10 >[/search]Here's what I put together to do just that (stripped down to its essentials). This example is called from a form on another page that initially passes a search string in [searchText], the number 1 in [startingPoint] and the number of found items to be displayed at once in [max] (I use a pop-up).---- file: searching.tmpl ------------------------[search db=items.db&startat=[startingPoint]&max=[max]&waTextDataRq=[searchText]][founditems][index]) [text]
[/founditems] [hideif [math]tempCalc[/math]<0]
[/hideif] [hideif [math]tempCalc[/math]>[numFound]]
[showif [math]tempCalc+[max][/math]<[math][numFound] +1[/math]] [/showif] [hideif [math]tempCalc[/math]=[math]totalFound[/math]] [showif [math]tempCalc+[max][/math]>[numFound]] [/showif][/hideif] [showif [math]tempCalc[/math]=[numFound]] [/showif]
[/hideif][/search]Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com Associated Messages, from the most recent to the oldest:

    
  1. Re: contextual shownext (Chris Gursche 1998)
  2. Re: contextual shownext (Rob Marquardt 1998)
  3. Re: contextual shownext (Bob Minor 1998)
  4. Re: contextual shownext (Chris Gursche 1998)
  5. contextual shownext (bob 1998)
On 2/21/98 8:57 AM, Bob Minor so noted...>>I think I might be able to help you, but I don't really understand what >>you want. What do you consider a contextual shownext? > >something like this: > >[search db=my.db&geskudata=0] >[founditems] >[sku][name]
>[/founditems] >(then I want 2 tags that say show previous and next 10 items) >ie >previous 10 next 10 >[/search]Here's what I put together to do just that (stripped down to its essentials). This example is called from a form on another page that initially passes a search string in [searchText], the number 1 in [startingPoint] and the number of found items to be displayed at once in [max] (I use a pop-up).---- file: searching.tmpl ------------------------[search db=items.db&startat=[startingPoint]&max=[max]&waTextDataRq=[searchText]][founditems][index]) [text]
[/founditems] [hideif [math]tempCalc[/math]<0]
[math]tempCalc[/math]> [cart]>
[/hideif] [hideif [math]tempCalc[/math]>[numFound]]
[math]tempCalc[/math]> [cart]> [showif [math]tempCalc+[max][/math]<[math][numFound] +1[/math]] [/showif] [hideif [math]tempCalc[/math]=[math]totalFound[/math]] [showif [math]tempCalc+[max][/math]>[numFound]] [math][numFound]-tempCalc+1[/math] Matches> [/showif][/hideif] [showif [math]tempCalc[/math]=[numFound]] [/showif]
[/hideif][/search]Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com Rob Marquardt

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:

Include Files (1998) test (2000) [WebDNA] Format Days_To_Date (2008) ALL CAPS converted to All Caps - first letter capitalizedonly (2002) Sample Tea Room Search Error (1997) Easter (1998) WCS Newbie question (1997) Next X hits (1996) New public beta available (1997) turning every 5th line red (1999) too many nested ... problem (1997) Shipping by order total (2003) Interfacing WC with mail server (1998) Latest Version of WebDNA store (2002) won't serve .tpl -index.tpl gone, made test.tpl (2000) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) suffix mapping for NT? (1997) Nested tags count question (1997) Itools, WEBCAT OSX (2003) Forcing Search w/ URL (1999)