EasyCFM.COM ColdFusion Forums / Coding Help! / CurrentRow MOD cfm

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: CurrentRow MOD cfm

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

theborg72
05-29-2012 @ 10:59 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 15
Joined: May 2010

hello I'm trying to get a loop. The idea is to just
create a table that shows 5 and 2 lines.

Instead of
1
2
3
4
5
6

I want
12345
space to make advertising
678910

I've made a CurrentRow MOD and got to the lines, but
not the space

  <table width="500" border="1">
    <tr><cfoutput query="testrec"
startRow="#StartRow_testrec#"
maxRows="#MaxRows_testrec#">

      <td>#testrec.tblOnskelista# </td>
             <CFIF testrec.CurrentRow MOD 5 IS 0>
                 
              </TR>
               <TR></TR>
          </CFIF>
            </cfoutput>
  </table>


I try to make an easy script to be able to use it in
different places.



Webmaster
06-09-2012 @ 11:39 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4533
Joined: Jan 2002

to be honest with you.. you would be better off handing this via css.

<div id="foo">
<cfloop query="yourQuery">
  <div id="row#currentrow#">
    <!--- output your data --->
  </div>
</cfloop>
</div>

<style media="all">
  #foo div { width: 20%; float: left; margin: 0px; padding: 0px; }
</style>

Something like that would give you better results and less code.

Pablo Varando
Senior Application Architect
EasyCFM.COM, LLC.

904.483.1457 \\ mobile
webmaster@easycfm.com \\email

\m/ (>.<) \m/
--- rock on ---

Sponsored By...
iOpenSoft, LLC is a Houston, Texas Advanced Technology Studio Specializing in Web Design, Web Development, iPhone App Development and Android App Development.