Re: Determining position

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 32081
interpreted = N
texte = The documentation is not so great here. I too have struggled with shownext, so maybe my explanation will help you.Here is the code you want to use to display x-y.Showing items [ShowNext] [start]-[end] [/shownext] of [numFOUND]Copy and paste it in. This will give you something like this: Showing items 1 - 10 of 100.I am going to throw the following in because you might also want to do this. Say your search returns 100 items and you are displaying the results 10 at a time. Here is some code that will let you put links on pages so that the user can jump directly from page 1 to page 5, for example:[ShowIF [NumFound]>10] Jump to page:
[ShowNext position=begin&max=10] [math]ceil([end]/10)[/math] • [/shownext] [ShowNext position=middle] [math]ceil([end]/10)[/math] [HideIF [NumFound]=[end]]•[/HideIF] [/shownext] [ShowNext position=end&max=10] [math]ceil([end]/10)[/math] [/shownext] [/ShowIF]You should be able to just cut and paste this in place, just change WHATEVER.tpl to the name of the template file you are using to display your search results. This will only display if you your search results return more than 10 items. If you want to show 15 to a page, just change the ALL the 10s in this snippet to 15.Hope this helps!! Jeff --- Dennis J. Bonsall, Jr. wrote: > Is there any way that I can determine my location in > a list of > [founditems]? To be more exact, I am returning a > results page whose > search parameter contains max=25. I want to have, > at the top of each > page, a phrase which states Displaying items x - > y, where x is the > starting value for that page, and y is the ending. > In other words, if > this were the third page of results, it would read > Displaying items 51 > - 75. > > What would be the easiest way to accomplish this? > > Thanks, > > Dennis > > > ------------------------------------------------------------- > 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://search.smithmicro.com/ __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Determining position (Jeff Grady 2000)
  2. Re: Determining position (Kenneth Grome 2000)
  3. Determining position (Dennis J. Bonsall, Jr. 2000)
The documentation is not so great here. I too have struggled with shownext, so maybe my explanation will help you.Here is the code you want to use to display x-y.Showing items [shownext] [start]-[end] [/shownext] of [numFOUND]Copy and paste it in. This will give you something like this: Showing items 1 - 10 of 100.I am going to throw the following in because you might also want to do this. Say your search returns 100 items and you are displaying the results 10 at a time. Here is some code that will let you put links on pages so that the user can jump directly from page 1 to page 5, for example:[ShowIF [NumFound]>10] Jump to page:
[ShowNext position=begin&max=10] [math]ceil([end]/10)[/math] • [/shownext] [ShowNext position=middle] [math]ceil([end]/10)[/math] [HideIF [NumFound]=[end]]•[/HideIF] [/shownext] [ShowNext position=end&max=10] [math]ceil([end]/10)[/math] [/shownext] [/ShowIF]You should be able to just cut and paste this in place, just change WHATEVER.tpl to the name of the template file you are using to display your search results. This will only display if you your search results return more than 10 items. If you want to show 15 to a page, just change the ALL the 10s in this snippet to 15.Hope this helps!! Jeff --- Dennis J. Bonsall, Jr. wrote: > Is there any way that I can determine my location in > a list of > [founditems]? To be more exact, I am returning a > results page whose > search parameter contains max=25. I want to have, > at the top of each > page, a phrase which states Displaying items x - > y, where x is the > starting value for that page, and y is the ending. > In other words, if > this were the third page of results, it would read > Displaying items 51 > - 75. > > What would be the easiest way to accomplish this? > > Thanks, > > Dennis > > > ------------------------------------------------------------- > 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://search.smithmicro.com/ __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/------------------------------------------------------------- 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://search.smithmicro.com/ Jeff Grady

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:

counting characters and/or words (1997) Kanji in http requests (1998) Shopping cart not being assigned (1999) # fields limited? (1997) [WebDNA] Help with work-around format date (2013) Preventing Merchant Settling ? (1997) Serial Number Question (1997) WebCat editing, SiteGuard WAS:SiteAssociative lookup style? (1997) Bug or syntax error on my part? (1997) Intermitent problem using [referrer] (1997) Carrying over data? (1997) URGENT: NO BUG, woFIELDdata & FIELDword=ww (2002) Slow applescript context ... (2000) WebCat chatroom (1997) Table Trouble... (2005) Re:Emailer and encryption (1997) [WebDNA] Listfiles and sort order (2010) OT: Unix Find Question (2004) Generating Report Totals (1997) Location of Browser Info.txt file (1997)