jeffcoughlin.com

CF_Search_NextPrevious Custom Tag Update (v1.10)

New version 1.10 (CF_Search_NextPrevious)

I have made a revision to the ColdFusion custom tag CF_Search_NextPrevious. In most cases anyone using v1.03 or newer can just overwrite their old version with this one. However I do suggest looking at the "Upgrade" documentation (a couple minor changes may effect a few people. More details are provided in the documentation).

The most notable new feature is the ability to use a single url variable instead of two (example: index.cfm?pg=7 instead of index.cfm?strt=71&maxr=10).

Thanks again to all the beta testers that helped make this revision possible.

(Change log)

2005-09-12 v1.10

- Added attribute "bEnablePageNumber"
- Added attribute "PageNumberURLName"
- Added attribute "bookmark"
- Added attribute "Layout_prePrevious"
- Added attribute "Layout_postPrevious"
- Added attribute "Layout_preNext"
- Added attribute "Layout_postNext"
- Added LayoutNumber "4"
- Added example 6 to demo.
- Prefixing url names with "url." is no longer required.
- default value for attribute "PageText" set to blank.
- Fixed a minor bug where the current page number might not display correctly.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Julie's Gravatar This works great until I try to pass a variable that has a % sign in it. Example
ExtraURLString="case_no=#case_no#"

and the value in #case_no# is 06%5

On the link for the next records it looks like it is going to work
http://localhost/cadmis/caseno_rn.cfm?case_no=06%5...

but Cold Fusion insists that case_no isn't defined and
it doesn't show up in the URL Parameters.
Am I missing something?
#1 by Julie | 9/23/06 8:25 PM
Julie's Gravatar Nevermind - I figured it out had to add
URLEncodedFormat in front of the variable.
case_no=#URLEncodedFormat(case_no)#
seems to have made ColdFusion happy.
#2 by Julie | 9/23/06 10:30 PM
Jeff Coughlin's Gravatar That's exactly what I was going to suggest :). I'm glad you got it working.
#3 by Jeff Coughlin | 9/24/06 10:12 PM
Brett's Gravatar Is there any type of modification when using this in a cfloop tag? Being that the tag attributes are a bit different. i.e. cfloop tag uses endrow instead of maxrows. Thanks for the tag.
#4 by Brett | 8/7/07 3:49 PM
Jeff Coughlin's Gravatar Yes. Actually I use cfloop all the time myself. I just tried to make the examples as simple as possible for people who might be new to CF.

cfloop query="qData" startrow="#startrow#" endrow="#endrow#"

where #startrow# could be #url.strt# or whatever you're using (same with endrow... might be #url.show#)
#5 by Jeff Coughlin | 8/7/07 4:07 PM
Brett's Gravatar Cool. Thanks.
#6 by Brett | 8/7/07 4:10 PM
steve's Gravatar Is there an easy way to add a show all records option?
#7 by steve | 5/2/08 6:10 PM



BlogCFC 5.9.8.007 by Raymond Camden | RSS | Contact Blog Owner