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

Dynamic Image Gallerry First Previous Next Last

Explorer ,
Jul 27, 2006 Jul 27, 2006

Copy link to clipboard

Copied

I had a friend help me build this but now he's gone and I don't understand arrays or coldfusion really. I have an image gallery that works beautifully except that I want to be able to add two behaviors to the page. 1.Pagination. 2. Display Record Count. (I know how to use the Dreamweaver built in Server Behaviors with Dynamic Tables but this is a little different from that b/c he's using arrays to build the table instead. I've almost go the pagination working. Except I can't figure how to show the last record. I've got "First, Next, & Previous" to work. But the "Last" doesn't. This is the part of the code that I'm concerned with as everything else is working.

<cfset CountUp=Count + 10>
<cfset CountDown=Count - 10>
<p align="center"><cfif Count gte 1><a href="gallery.cfm">First</a></cfif>  <cfif Count gte 10><a href="gallery.cfm?Count=<cfoutput>#CountDown#</cfoutput>">Previous</a></cfif>  <cfif ArrayLen(PhotoArray) gt CountUp><a href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Next</a></cfif><cfif ArrayLen(PhotoArray) lt CountUp><a href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Last</a></cfif>

I have no idea how to write the "Display record counts" so if someone can help me write that part I would be so greatful.

Here is all of the code for this page attatched...
TOPICS
Advanced techniques

Views

228

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 27, 2006 Jul 27, 2006

Copy link to clipboard

Copied

Nobody's helping me

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 27, 2006 Jul 27, 2006

Copy link to clipboard

Copied

LATEST
All day and no help still? Anyone out there?

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