Ah, this is one my favorite questions!

When you publish a bunch of objects to a container, they are all passed to
the handler (if you use the same handler for each). Let's assume you have
objects A, B, C, and D using method Display.

Now, normally, you code your handlers like so:

<CFA_Handler Object="Article" SEPARATOR="<P>">
        <CFOUTPUT>#article.title#</CFOUTPUT>
</CFA_Handler>

What people forget is that you can put code both before and after the
CFA_Handler tag. In fact, the CFA_Handler tag is just a 'helper' for
handlers. You don't have to use it.

So, let's say you want a table, 2 columns across, you could do it rather
easily like so:


<CFSET X = 1>
<TABLE>
<TR>

<CFA_Handler OBJECT="Article">
        <TD>#Article.Title#</TD>
        <CFSET X = X + 1>
        <CFIF X MOD 2>
             </TR><TR>
      </CFIF>
</CFA_Handler>

<!--- handle potential missing final td --->
<CFIF NOT (X MOD 2)>
  <TD>&nbsp;</TD>
</CFIF>
</TR>
</TABLE>

Make sense?
=======================================================================
Raymond Camden, Cold Fusion Jedi Master for Syntegra (www.syntegra.com)
Allaire Certified Instructor and Member of Team Allaire

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 10, 2000 2:46 PM
> To: [EMAIL PROTECTED]
> Subject: How to get a container to show results in a table, not in a
> column
>
>
>
> Hello
>
> I am interested in creating a container that will display the selected
> objects (via any publishing rule) in a table format - ie instead of one
> object listed after the other going down the page, I would like to have it
> put the results in a table of n columns.  The first item in the container
> goes top left, then the second item in the top right and so on..
>
> How would I be able to accomplish this?  We currently have it
> implemented as
> six, eight or ten separate containers, but it will turn into a maintenance
> night mare
>
> Terry Mulholland
> ------------------------------------------------------------------
> ------------
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/sp
> ectra_talk or send a message to
> [EMAIL PROTECTED] with 'unsubscribe' in the body.

------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to