Re: Need formatting help

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19591
interpreted = N
texte = >I am trying to output the results of a database search into a page with >specific formatting needs. When there is only one match, I need to have >the results placed into a table with one cell only. When there are two >matches, it would be two cells wide (only one high) and with three, it >would be three wide and one high. If there are more than three, I need >to have the pattern repeat. In other words, if there are four matches, >I need to have the top table to have three cells, and the second table >to have only one cell. > >If this makes any sense, and some one can help me, I would greatly >appreciate it...Here, try this, it always works for me:[search] [founditems] [showif [index]\3][/showif] [/founditems]
[fieldName]
[/search]The [showif] context adds the tags after every three found items, and those tags are responsible for creating the row breaks in your table.Oh, by the way, if the backslash in [showif [index]\3] doesn't work, try a forward slash instead: [showif [index]/3] instead. I always forget whether or not the divisible by character is a forward slash or a backslash, but one of them actually does work ... :)Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: Need formatting help (PCS Technical Support 1998)
  2. Re: Need formatting help (Kenneth Grome 1998)
  3. Need formatting help (Dennis J. Bonsall, Jr. 1998)
>I am trying to output the results of a database search into a page with >specific formatting needs. When there is only one match, I need to have >the results placed into a table with one cell only. When there are two >matches, it would be two cells wide (only one high) and with three, it >would be three wide and one high. If there are more than three, I need >to have the pattern repeat. In other words, if there are four matches, >I need to have the top table to have three cells, and the second table >to have only one cell. > >If this makes any sense, and some one can help me, I would greatly >appreciate it...Here, try this, it always works for me:[search] [founditems] [showif [index]\3][/showif] [/founditems]
[fieldName]
[/search]The [showif] context adds the tags after every three found items, and those tags are responsible for creating the row breaks in your table.Oh, by the way, if the backslash in [showif [index]\3] doesn't work, try a forward slash instead: [showif [index]/3] instead. I always forget whether or not the divisible by character is a forward slash or a backslash, but one of them actually does work ... :)Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

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:

(OT) SERVER FREEZES ALL AT SAME TIME (2004) WC2b15 File Corruption (1997) catagories (1997) Searching (2005) TaxTotal Problem (1997) off topic - dna snipets (1997) Why is this not false? (2001) Log-in Scheme (2003) sku not found (1997) NT or Mac (1997) Frames and WebCat (1997) Virtual hosting and webcatNT (1997) Help with Repost Data msg from form (1997) Can't use old cart file (was One more try) (1997) WebCatalog keeps quiting on Solaris, and support isn't su (2000) displaying New products (Yikes! it's Fixed!) (1997) Further on formula.db failure to calculate shipCost (1997) [OT] JS Help PLEASE (2006) Not really WebCat (1997) Bug? (1997)