Re: [WebDNA] Styling search results [using css]
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 102382
interpreted = N
texte = Assuming you've got the columns working as expected (I haven't checked), =one way is:[search db=3Ddata.db]
[founditems] [hideif [index]\2]
[data]
[/hideif] [/founditems]
[founditems] [showif [index]\2]
[data]
[/showif] [/founditems]
[/search]On Thu, 09 Apr 2009 13:39:04 -0700 "cw@e-wave.net"
wrote:> Thanks Michael.=20>=20> Any idea how to do it without using tables - just CSS? Maybe this is on=e of> those times to compromise, but I really need to avoid tables unless I a=m> displaying tabular data.>=20> Thanks,> -Chris>=20> On 4/9/09 10:52 AM, "Michael A. DeLorenzo" w=rote:>=20>> I use something like this frequently. I forgot if I wrote this code or= if I>> changed someone else's to work for my purpose. In any case, it works :=)>>=20>> BTW...This is for 3 col output. Just change the number in the math var= to>> the number you need.>>=20>>=20>> [search db=3D../dbs/member.db&neskudatarq=3D0&lastNamesort=3D1&lastNam=eType=3Dtext]>> [math show=3Df]cols=3Dceil([numfound]/3)[/math]>> [math show=3Df]offset=3Dcols[/math]>> >> [loop start=3D1&end=3D[cols]]>> [math show=3Df]offset=3Doffset-1[/math]>> [founditems]>> [showif [math]([index]+[offset])\[cols][/math]=3D1]>> >> [namePrefix] [firstName] [middleInitial][hideif [middleInitial]=3D].[/=hideif]>> [lastName] [namesuffix] [hideif [nickName]=3D]([nickName])[/hideif]>> | >> [/showif]>> [/founditems]
>> [/loop]>>
[/search]>>=20>>=20>>=20>> Michael=20>>=20>> -----Original Message----->> From: cw@e-wave.net [mailto:cw@e-wave.net]>> Sent: Thursday, April 09, 2009 1:17 PM>> To: talk@webdna.us>> Subject: [WebDNA] Styling search results>>=20>> So, my search works when I just list the results in a single column an=d the>> CSS layout works with static data. But, what I need to do is to displa=y 2>> columns (or rows) of results, like this:>>=20>> 1 3>> 2 4>>=20>> or:>>=20>> 1 2>> 3 4>>=20>> Any suggestions are greatly appreciated.>>=20>> Thanks,>> -Chris>> -------------------------->>=20>> css:>>=20>> #box{>> width:690px;>> overflow:hidden;>> }>> #box li{>> float:left;>> width:350px;>> overflow:hidden;>> }>> #box .col2{>> width:340px;>> }>> #box li img{>> float:left;>> }>> #box li .breif{>> float:left;>> width:230px;>> }>>=20>>=20>> code:>>=20>> >> [search db=3Ddata.db]>> [founditems]>> -
>> >>
[data]
>> =20>> >> -
>> >>
[data]
>> =20>> >> [/founditems]=20>> [/search] =20>>
>> =20>> ###>=20>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> old archives: http://dev.webdna.us/TalkListArchive/
Associated Messages, from the most recent to the oldest:
Assuming you've got the columns working as expected (I haven't checked), =one way is:[search db=3Ddata.db] [founditems] [hideif [index]\2]
[data]
[/hideif] [/founditems]
[founditems] [showif [index]\2]
[data]
[/showif] [/founditems]
[/search]On Thu, 09 Apr 2009 13:39:04 -0700 "cw@e-wave.net" wrote:> Thanks Michael.=20>=20> Any idea how to do it without using tables - just CSS? Maybe this is on=e of> those times to compromise, but I really need to avoid tables unless I a=m> displaying tabular data.>=20> Thanks,> -Chris>=20> On 4/9/09 10:52 AM, "Michael A. DeLorenzo" w=rote:>=20>> I use something like this frequently. I forgot if I wrote this code or= if I>> changed someone else's to work for my purpose. In any case, it works :=)>>=20>> BTW...This is for 3 col output. Just change the number in the math var= to>> the number you need.>>=20>>=20>> [search db=3D../dbs/member.db&neskudatarq=3D0&lastNamesort=3D1&lastNam=eType=3Dtext]>> [math show=3Df]cols=3Dceil([numfound]/3)[/math]>> [math show=3Df]offset=3Dcols[/math]>> >> [loop start=3D1&end=3D[cols]]>> [math show=3Df]offset=3Doffset-1[/math]>> [founditems]>> [showif [math]([index]+[offset])\[cols][/math]=3D1]>> >> [namePrefix] [firstName] [middleInitial][hideif [middleInitial]=3D].[/=hideif]>> [lastName] [namesuffix] [hideif [nickName]=3D]([nickName])[/hideif]>> | >> [/showif]>> [/founditems]
>> [/loop]>>
[/search]>>=20>>=20>>=20>> Michael=20>>=20>> -----Original Message----->> From: cw@e-wave.net [mailto:cw@e-wave.net]>> Sent: Thursday, April 09, 2009 1:17 PM>> To: talk@webdna.us>> Subject: [WebDNA] Styling search results>>=20>> So, my search works when I just list the results in a single column an=d the>> CSS layout works with static data. But, what I need to do is to displa=y 2>> columns (or rows) of results, like this:>>=20>> 1 3>> 2 4>>=20>> or:>>=20>> 1 2>> 3 4>>=20>> Any suggestions are greatly appreciated.>>=20>> Thanks,>> -Chris>> -------------------------->>=20>> css:>>=20>> #box{>> width:690px;>> overflow:hidden;>> }>> #box li{>> float:left;>> width:350px;>> overflow:hidden;>> }>> #box .col2{>> width:340px;>> }>> #box li img{>> float:left;>> }>> #box li .breif{>> float:left;>> width:230px;>> }>>=20>>=20>> code:>>=20>> >> =20>> ###>=20>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> old archives: http://dev.webdna.us/TalkListArchive/
"Dan Strong"
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:
can I get formvariables for an include? (1999)
Problem 2: Prefs file... (1997)
New index for docs (1997)
Ready to h[url]!!! (1999)
Re[2]: php vs WebCatalog (2000)
[addlineitems] display (1997)
Security Issues and WebCommerce Solution (1997)
Trouble with formula.db (1997)
what include am I using! (2005)
Help name our technology! (1997)
Download URL & access on the fly ? (1997)
Setting up shop (1997)
[WebDNA] mydatabase.db-oRiGiNaL- (2016)
performans tests... (2001)
turning every 5th line red (1999)
possible, WebCat2.0 and checkboxes-restated (1997)
WebCat Linux: Could not create pipeKey segment (2000)
WebMerchant and PC Auth Hub (1999)
Setting up WebCatalog with Retail Pro data (1996)
Just Testing (1997)