Re: Formating found categories
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 11895
interpreted = N
texte = >>I've been messing with trying to get found categories on a search.tmpl>>file in to a table.>>>>ie there are say 6 catagories in the db, and we want to display then in 2>>columns of 3.>>I don't remember if anyone answered this already, but here's the hint:>>In order to 'break' at an arbitrary column while displaying a list of>[founditems], you use [showif]'s ability to sense when a number is>divisible by another.>>[showif [index]\3] means to do something every third time.>>So you would set up your table _as though_ it would go on forever with>just one row leading from left to right. But you would put the [showif]>inside that causes something special to happen every third item. In your>case, it would close off the row and start another new row.>>
>>[foundItems]>[sku] | [showif [index]\3]
[/showif]>[/foundItems]>
>
Oh ... THAT's how you do it!I saw that [index]\3 stuff in the HTML docs, but without an example Icouldn't figure out how to implement it. Maybe I was having one of mybrain-dead days, but the description and example above sure makes it clear.Thank you Grant !!! :)Sincerely, Ken GromeWebDNA Solutions
Associated Messages, from the most recent to the oldest:
>>I've been messing with trying to get found categories on a search.tmpl>>file in to a table.>>>>ie there are say 6 catagories in the db, and we want to display then in 2>>columns of 3.>>I don't remember if anyone answered this already, but here's the hint:>>In order to 'break' at an arbitrary column while displaying a list of>
[founditems], you use
[showif]'s ability to sense when a number is>divisible by another.>>[showif [index]\3] means to do something every third time.>>So you would set up your table _as though_ it would go on forever with>just one row leading from left to right. But you would put the
[showif]>inside that causes something special to happen every third item. In your>case, it would close off the row and start another new row.>>
>>[founditems]>[sku] | [showif [index]\3]
[/showif]>[/foundItems]>
>
Oh ... THAT's how you do it!I saw that [index]\3 stuff in the HTML docs, but without an example Icouldn't figure out how to implement it. Maybe I was having one of mybrain-dead days, but the description and example above sure makes it clear.Thank you Grant !!! :)Sincerely, Ken GromeWebDNA Solutions
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:
[WebDNA] 404 Problem (2015)
& Problem in Textarea (1999)
Sorting by date (1997)
[SearchString] usage (1997)
Answer: WebDelivery downloads alias, not original ? (1997)
Plugin or CGI or both (1997)
Search in 2 or more catalogs (1997)
[OT] Dedicated Image Uploader/Server [/OT] (2003)
Error:Too many nested [xxx] contexts (1997)
Searching (1998)
Help formatting search results w/ table (1997)
ReturnRaw context (1997)
Hiding HTML and page breaks (1997)
b12 cannot limit records returned and more. (1997)
Thanks Grant (1997)
[sendmail] and [formvariables] (1997)
Large founditems loops (2000)
WebCat2b15MacPlugin - [protect] (1997)
[WebDNA] 60% failure rate using replace in a loop (2010)
[WebDNA] Ubuntu 14.04 & WebDNA (2017)