Cornfeed.com - Growing tomorrow's e-business
My Account

Sign-in to access your account.
Information

Version: 0.2
Release Date: 5/28/03
Size: 2kb



Navigation
  • Usage and Documentation
  • Online Demo
  • Download




  • « Return to Overview

    Usage

    CF_PageList is very simple to use. Simply include a single line of code and the entire navigation will be created for you. Here is a breakdown of each of the parameters that can be used.

    Required Attributes:

    TotalRecords - Total number of records in the listing.
    CurrentSet - The number at which the current set begins at.

    Optional Attributes:

    ResultsPerPage - The number of records per page.
    QueryString - A query string to append in the links.
    URLVarName - The URL variable name to be used to denote the number at which the current set is at. You can use this variable to pass back to the tag to go through the listings.
    PageSpan - Number of pages to show at a time. PageSpan / 2 is the number of extra pages shown on each side of the Current Page.

    For a demo and sample code, click here.

    Documentation

    This tag will create a Google type page listing where only the specified number of pages will be listed. For example, if you have 100 pages, you can choose to only show 10 at a time, such as:

    << 6 7 8 9 10 11 12 13 14 15 16 >>
    The 10 (or specified number + 1) of pages will be adjusted as you move through the listings.

    A common error when first implementing this tag, is that users receive an error saying that the variable they are using in the CurrentSet attribute is undefined. This is because on the first visit to the page, the variable is not defined. The use of <cfparam> will solve this problem. Simply make the default value 1.

    Related Links

    Usage and Documentation
    Online Demo
    Download


    Copyright © Cornfeed.com 1999-2008