2 Replies Latest reply on Jul 27, 2006 8:31 PM by jimmylharrell

    Dynamic Image Gallerry First Previous Next Last

    jimmylharrell Level 1
      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...