RE: [WebDNA] Styling search results [using css]

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102392
interpreted = N
texte = Just set the % to whatever you need. In this case it will produce two columns (20% = five columns for example). This should give you: 1 2 3 4 etc. [search db=yoursearch] [foundItems]
[displayname]
[/foundItems] [/search] To get 13 24 Then modify the search like this (set the breakat appropriately, using [numfound] for complete sets). This breaks the entire found records into two columns.
[search db=[root]db/members.db&neuseruiddatarq=z&max=20] [math show=f]breakat=ceil(20/2)[/math] [foundItems] [displayname]
[showif [index]=[breakat]]
[/showif] [/foundItems] [/search]
-----Original Message----- From: Chris Wilkinson [mailto:cw@e-wave.net] Sent: Friday, April 10, 2009 8:20 AM To: talk@webdna.us Subject: Re: [WebDNA] Styling search results [using css] Thanks Dan... Odd results with this method, it yielded: 2 2 4 4 So, how do I get to? 1 2 3 4 Thanks, -Chris On 4/9/09 2:24 PM, "Dan Strong" wrote: > Assuming you've got the columns working as expected (I haven't > checked), one way is: > > [search db=data.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. >> >> Any idea how to do it without using tables - just CSS? Maybe this is >> one of those times to compromise, but I really need to avoid tables >> unless I am displaying tabular data. >> >> Thanks, >> -Chris >> >> On 4/9/09 10:52 AM, "Michael A. DeLorenzo" wrote: >> >>> 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 :) >>> >>> BTW...This is for 3 col output. Just change the number in the math >>> var to the number you need. >>> >>> >>> [search >>> db=../dbs/member.db&neskudatarq=0&lastNamesort=1&lastNameType=text] >>> [math show=f]cols=ceil([numfound]/3)[/math] >>> [math show=f]offset=cols[/math] >>> >>> [loop start=1&end=[cols]] [math show=f]offset=offset-1[/math] >>> [founditems] [showif [math]([index]+[offset])\[cols][/math]=1] >>> >>> [/showif] >>> [/founditems] >>> [/loop] >>>
>>> [namePrefix] [firstName] [middleInitial][hideif >>> [middleInitial]=].[/hideif] [lastName] [namesuffix] [hideif >>> [nickName]=]([nickName])[/hideif] >>>
[/search] >>> >>> >>> >>> Michael >>> >>> -----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 >>> >>> So, my search works when I just list the results in a single column >>> and the CSS layout works with static data. But, what I need to do is >>> to display 2 columns (or rows) of results, like this: >>> >>> 1 3 >>> 2 4 >>> >>> or: >>> >>> 1 2 >>> 3 4 >>> >>> Any suggestions are greatly appreciated. >>> >>> Thanks, >>> -Chris >>> -------------------------- >>> >>> css: >>> >>> #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; >>> } >>> >>> >>> code: >>> >>> >>> >>> ### >> >> >> --------------------------------------------------------- >> 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/ > > --------------------------------------------------------- > 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/ > --------------------------------------------------------- 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:

    
  1. Re: [WebDNA] Styling search results [using css] (Chris Wilkinson 2009)
  2. RE: [WebDNA] Styling search results [using css] ("Olin Lagon" 2009)
  3. Re: [WebDNA] Styling search results [using css] (Donovan Brooke 2009)
  4. Re: [WebDNA] Styling search results [using css] (Donovan Brooke 2009)
  5. Re: [WebDNA] Styling search results [using css] (William DeVaul 2009)
  6. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  7. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  8. Re: [WebDNA] Styling search results [using css] (Chris Wilkinson 2009)
  9. Re: [WebDNA] Styling search results [using css] (Chris Wilkinson 2009)
  10. Re: [WebDNA] Styling search results [using css] (William DeVaul 2009)
  11. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  12. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  13. Re: [WebDNA] Styling search results [using css] ("cw@e-wave.net" 2009)
Just set the % to whatever you need. In this case it will produce two columns (20% = five columns for example). This should give you: 1 2 3 4 etc. [search db=yoursearch]
[founditems]
[displayname]
[/foundItems] [/search] To get 13 24 Then modify the search like this (set the breakat appropriately, using [numfound] for complete sets). This breaks the entire found records into two columns.
[search db=[root]db/members.db&neuseruiddatarq=z&max=20] [math show=f]breakat=ceil(20/2)[/math] [founditems] [displayname]
[showif [index]=[breakat]]
[/showif] [/foundItems] [/search]
-----Original Message----- From: Chris Wilkinson [mailto:cw@e-wave.net] Sent: Friday, April 10, 2009 8:20 AM To: talk@webdna.us Subject: Re: [WebDNA] Styling search results [using css] Thanks Dan... Odd results with this method, it yielded: 2 2 4 4 So, how do I get to? 1 2 3 4 Thanks, -Chris On 4/9/09 2:24 PM, "Dan Strong" wrote: > Assuming you've got the columns working as expected (I haven't > checked), one way is: > > [search db=data.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. >> >> Any idea how to do it without using tables - just CSS? Maybe this is >> one of those times to compromise, but I really need to avoid tables >> unless I am displaying tabular data. >> >> Thanks, >> -Chris >> >> On 4/9/09 10:52 AM, "Michael A. DeLorenzo" wrote: >> >>> 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 :) >>> >>> BTW...This is for 3 col output. Just change the number in the math >>> var to the number you need. >>> >>> >>> [search >>> db=../dbs/member.db&neskudatarq=0&lastNamesort=1&lastNameType=text] >>> [math show=f]cols=ceil([numfound]/3)[/math] >>> [math show=f]offset=cols[/math] >>> >>> [loop start=1&end=[cols]] [math show=f]offset=offset-1[/math] >>> [founditems] [showif [math]([index]+[offset])\[cols][/math]=1] >>> >>> [/showif] >>> [/founditems] >>> [/loop] >>>
>>> [namePrefix] [firstName] [middleInitial][hideif >>> [middleInitial]=].[/hideif] [lastName] [namesuffix] [hideif >>> [nickName]=]([nickName])[/hideif] >>>
[/search] >>> >>> >>> >>> Michael >>> >>> -----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 >>> >>> So, my search works when I just list the results in a single column >>> and the CSS layout works with static data. But, what I need to do is >>> to display 2 columns (or rows) of results, like this: >>> >>> 1 3 >>> 2 4 >>> >>> or: >>> >>> 1 2 >>> 3 4 >>> >>> Any suggestions are greatly appreciated. >>> >>> Thanks, >>> -Chris >>> -------------------------- >>> >>> css: >>> >>> #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; >>> } >>> >>> >>> code: >>> >>> >>> >>> ### >> >> >> --------------------------------------------------------- >> 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/ > > --------------------------------------------------------- > 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/ > --------------------------------------------------------- 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/ "Olin Lagon"

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:

So when do we get something similar? (1998) Is this possible in simple search? question? (1998) 2 easy questions re: [showif] and [sendmail] (1997) Databases going to sleep (1998) serial number dishing (1997) SetHeader context (1998) Stopping bad HTML propagation ? (1997) shoppingcart reload qty (1997) FORM NONSENSE - WAS: How much is too much? (2002) Up and running ... at last !! (1997) [WebDNA] WebDNA 7 (2011) Search anomaly aaarrgghh! (2000) Problems getting parameters passed into email. (1997) [SearchString] usage (1997) [SHOWIF]s and empty arguments (1997) I'm new be kind (1997) & in Lookups (1997) WebCat2.0 [format thousands .0f] no go (1997) Re:2nd WebCatalog2 Feature Request (1996) SiteEdit NewFile.html ? (1997)