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]
[/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 Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>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]
[/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 Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://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:
MacOS alias identification? (1998)
Append..... doesn't (2000)
About to give up (1998)
[append] vs. [appendfile] delta + question? (1997)
OT: 800x600 (2003)
Subtotal Not Calculated on Invoice.html (1998)
ErrorMessages.db (1998)
WebCat2.0 [format thousands .0f] no go (1997)
You *can!!* overwrite username/password using an HTML form. Also, experts *please* see Q at end (2000)
Just testing (2003)
Join us at MacWorld! - Part 2 (1998)
CountChars (2004)
Problems when user hit back (2000)
REPOST [SUM field=xxxx] (2000)
no template caching (1997)
Emailer Set Up (1997)
Locking up with WebCatalog... (1997)
Frames and WebCat (1997)
[HTML*] (a proposition) (1997)
[WebDNA] OSX users (2009)