Dynamic Images in Nested Output

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Dynamic Images in Nested Output

    I found an almost answer in the post titled 'dynamic images with information'
    but I'm using a join to get the records and nested <cfoutput> tags to display
    it. Here's what I have now <cfset intCols = 4> <cfset intBlanks =
    intCols-(rsRaid.recordcount mod intCols)> <cfset strBlank =
    '<td>&amp;nbsp;</td>'> <cfif intBlanks eq intCols> <cfset intBlanks = 0>
    </cfif> and it's displayed as <table> <cfoutput query='rsRaid'
    group='raidID'> <tr> <td>Raid Name</td> </tr> <tr>
    <cfoutput> <td><imgsrc='images/#rsRaid.imgThumb#'></td>
    <cfif currentrow mod intCols eq 0> </tr><tr>
    </cfif> </cfoutput>
    <cfoutput>#repeatstring(strBlank, intBlanks)#</cfoutput> </tr>
    </cfoutput> </table> I'm getting way too many extra <td>'s inserted, so I know
    I need to mod it, if it can be for this example. I think the math gets screwed
    up because rsRaid is a join that gets the raid records and matches up the
    images for them. Any ideas??? thanks in advance.

    SSgt P Guest

  2. Similar Questions and Discussions

    1. Extension: Dynamic Images/Advance Random Images
      Hi there, I have downloaded 2 extensions: Dynamic Images or/and Advanced Random Images (kaosweaver.com); it seems both are the same and I have...
    2. Nested Group Output
      I am attempting to set up a 3 tier category structure for a product catalogue. i.e there sould be a parent category - Cars, then a subcategory -...
    3. Using Maxrows with Nested Output
      This seems so simple but how does MAXROWS work with nested queries that are grouped? If you apply it at the top level it limits the number of...
    4. HELP PLEASE: Nested Paths and Dynamic Text
      I have really been struggling with this, any ideas would be greatly appreciated.. I have a parent SWF file that loads a child SWF The child...
    5. spliced images (nested tables vs. rowspan)
      What do you mean by splicing? Best regards, Linda Rathgeber ---------------- Victoriana | http://www.projectseven.com/dpacks/vic/index.htm...
  3. #2

    Default Re: Dynamic Images in Nested Output

    Okay, figured it out. Here's what I did in case anyone else needs a hand in the
    future. <cfset i = 1> <cfset StartNewRow = True> <table> <cfoutput
    query='rsRaid' group='raidID'> <tr> <td
    colspan='4'>#rsRaid.raidName#</td> </tr> <cfoutput> <cfif
    StartNewRow IS True> <tr> </cfif>
    <td><imsrc='images/thumb/#rsRaid.imgThumb#'></td> <cfset i = i + 1>
    <cfif i LT 5> <cfset StartNewRow = False>
    <cfelse> <cfset StartNewRow = True> <cfset i = 1>
    </cfif> <cfif StartNewRow IS True> </tr> </cfif>
    </cfoutput> <cfset i = 1> </cfoutput> </table> Works like a charm.

    SSgt P Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139