Date: Fri, 29 Mar 2024 11:49:37 +0000 (UTC) Message-ID: <261612062.65.1711712977079@4e60c083bc6d> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_64_2078816626.1711712977079" ------=_Part_64_2078816626.1711712977079 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Yikes! Major work in progress alert.
Customising the look of pagination has always been a bitc...... a bit di= fficult. Lets make it easier shall we.
MEET, farPagination.cfc
CALL PAGINATION USING THE TAG:
<ski= n:pagination qRecordSet=3D"qAllMyCustomers"> <cfdump var=3D"#stObject#" expand=3D"false" label=3D"stObject" /> </skin:pagination>
TO CUSTOMISE THE PAGINATION OUTPUT, CREATE YOUR OWN farPagination webski= n. The default is displayLinks.cfm
<cfo= utput> <cfif getPageTo() GT 1> =09<cfoutput> =09<div class=3D"paginator-wrap"> =09=09<div class=3D"paginator">=09 =09=09=09#renderLink(linkid=3D"previous", linkText=3D"< previous")# =09=09=09 =09=09=09<cfloop from=3D"#getPageFrom()#" to=3D"#getPageTo()#" index=3D"= i"> =09=09=09=09#renderLink(linkid=3Di)# =09=09=09</cfloop> =09=09=09 =09=09=09#renderLink(linkid=3D"next", linkText=3D"next >")# =09=09</div> =09</div> =09</cfoutput>=09 </cfif>
EXAMPLE CODE:
<ski= n:pagination query=3D"#yourquery#" typename=3D"yourtypename" recordsPerPage=3D"#stobj.numitems#">=20 =09 <skin:view objectid=3D"#stobject.objectid#" typename=3D"yourtypename" we= bskin=3D"#stObj.displaymethod#" /> </skin:pagination>
Basically the skin:pagination tag manages the loop, and provides you wit= h a new #request.stobject# variable with the contents of the current row ea= ch loop.
You can rename this variable using the r_stobject=3D"myVar" attribute.= p>
Check farcry\core\packages\forms\farPagination.cfc for all available met= hods and attributes.