• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamic Thumb Table

Explorer ,
Jul 12, 2006 Jul 12, 2006

Copy link to clipboard

Copied

Can't find any documentation on this.

How can I dynamically create an HTML table with say 5 columns that populate with image thumbnails? Each thumb should be in its own <TD> cell and should be limited to 10 <TR>'s per page. The image thumbs file paths are retained in a database along with the corresponding large image path. Thanks.
TOPICS
Advanced techniques

Views

303

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 12, 2006 Jul 12, 2006

Copy link to clipboard

Copied

For 10 <tr>s per page, that's 50 records right? Do you know how to limit output to 50 records per page?

For 5 cells per row, something like this should work.

<table>
<tr>
<cfoutput query="yourquery">
<td>#stuff#</td>
<cfif currentrow mod 5 is 0>
</tr><tr>
<cfelseif currentrow is recordcount>
</tr>
</cfif>
</cfoutput>
</table>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 12, 2006 Jul 12, 2006

Copy link to clipboard

Copied

Cool. Thanks. So simple it hurts. I assume using the maxrows attribute of the query would limit the table to 10 rows or I could use the Previous/Nextcustom tag from the Exhchange. Thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 12, 2006 Jul 12, 2006

Copy link to clipboard

Copied

LATEST
Cool. Thanks. So simple it hurts. I assume using the maxrows attribute of the query would limit the table to 10 rows or I could use the Previous/Nextcustom tag from the Exhchange. Thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation