Shownext replacement (sharing)

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 55105
interpreted = N
texte = A while ago there was some discussion about shownext and the format to make it appear more user friendly. I believe Gary Krockover shared some code on the subject. (My apologies if I got the wrong person). I have added a few lines to the code and in the spirit of xmas thought I would share: ========= [search db=products.db&eqSOMECRITERIAdatarq=[value]&startat=[startat]&max=30] [text show=f]dividerA=[math]ceil([numfound]/30)[/math][/text] Page: [Loop start=1&end=[dividerA]] [hideif [divnum]=[index]] [hideif [index]=1] [/hideif][/hideif][index] | [/Loop] [/search] ========= Basically the logic is that you repeat your search values in this search code at the bottom (or the top) of your results page. You will then get a results that looks like: Page 1 | 2 | 3 etc I added code to disable the link on the first index(1) and if the resulting page index is the one you are looking at. This makes it a lot easier to see 'where' you are in the list of pages as well as stops redundant page selection. Anyway, like I said..just sharing. I suppose someone could even pass the search vars in a string so you could pass it (though for our app it wasn't necessary). You could even go as far as setting up a range for numbers in front of and behind your current Index number... Such as: Page ... 4 | 5 | 6 ... Etc by comparing [divnum] with a math range of the current index. Anyway... Enjoy. Alex Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.com Interface Designer WebDNA Programmer Database Designer ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Shownext replacement (sharing) ( Alex McCombie 2003)
A while ago there was some discussion about shownext and the format to make it appear more user friendly. I believe Gary Krockover shared some code on the subject. (My apologies if I got the wrong person). I have added a few lines to the code and in the spirit of xmas thought I would share: ========= [search db=products.db&eqSOMECRITERIAdatarq=[value]&startat=[startat]&max=30] [text show=f]dividerA=[math]ceil([numfound]/30)[/math][/text] Page: [Loop start=1&end=[dividerA]] [hideif [divnum]=[index]] [hideif [index]=1] [thisurl]?Sku=[SKU]&cart=[cart]&divnum=[index]&startat=[math]([index]* 30)-29[/math]">[/hideif][/hideif][index] | [/Loop] [/search] ========= Basically the logic is that you repeat your search values in this search code at the bottom (or the top) of your results page. You will then get a results that looks like: Page 1 | 2 | 3 etc I added code to disable the link on the first index(1) and if the resulting page index is the one you are looking at. This makes it a lot easier to see 'where' you are in the list of pages as well as stops redundant page selection. Anyway, like I said..just sharing. I suppose someone could even pass the search vars in a string so you could pass it (though for our app it wasn't necessary). You could even go as far as setting up a range for numbers in front of and behind your current Index number... Such as: Page ... 4 | 5 | 6 ... Etc by comparing [divnum] with a math range of the current index. Anyway... Enjoy. Alex Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.com Interface Designer WebDNA Programmer Database Designer ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Alex McCombie

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:

multi-paragraph fields (1997) Webcat 2.0.1 date math bug -> Crash! (1997) [OT] Thinking about a new Mac server (2004) Preventing Merchant Settling ? (1997) Template Not Found (1998) [append] and SSL (1997) too many nested [xxx] (1997) Max Record length restated as maybe bug (1997) Emailer and encryption (1997) Change [cart] date (2002) passing info to thankyou.tpl (1998) RE: protect tag not working (1998) Secure server question (1997) WebCat2: Items xx to xx shown, etc. (1997) New York City sales tax database needed (1997) NT Manual (1997) WebCat2: Found Items syntax, etc. (1997) WC 2.0 frames feature (1997) problems with 2 tags shakur (1997) WebCat2: Items xx to xx shown, etc. (1997)