|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Tutorial on creating this pagination?
Author: Ian Skinner
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#340122
On 12/17/2010 12:54 PM, Adam Parker wrote:
> What am I doing wrong?
>
You need to put them inside of <foutput> blocks.
<cfoutput>#pagination.getRenderedHTML()#</cfoutput>
...
<cfoutput>#pagination.getRenderedHTML()#</cfoutput>
Author: Michael Grant
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#340121
You need to wrap this "#pagination.getRenderedHTML()#" in this
<cfoutput></cfoutput>
----- Excess quoted text cut - see Original Post for more -----
Author: Adam Parker
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#340120
Please excuse my ignorance as I've never used a CFC either.
My cfm page is:
<!---Get poems--->
<cfquery name="qGetPoems" datasource="myDSN">
SELECT id, poemTitle, average FROM PoetryContest2010 order by id asc
</cfquery>
<cfset pagination = createObject("component", "Pagination").init() />
<cfset pagination.setQueryToPaginate(qGetPoems) />
<cfset pagination.setItemsPerPage(25) />
<cfset pagination.setUrlPageIndicator("page") />
<cfset pagination.setShowNumericLinks(true) />
#pagination.getRenderedHTML()#
<cfoutput query="qGetPoems" startrow="#pagination.getStartRow()#"
maxrows="#pagination.getMaxRows()#">
<li>#id# - #poemTitle#</li>
</cfoutput>
#pagination.getRenderedHTML()#
The Pagination.cfc is located in a directory one level deep in the root directory
in a folder called "components." The above code is on a cfm page two levels deep
in the root directory.
The ids and poem titles show, but #pagination.getRenderedHTML()# literally shows
and is not interpreted by CF. What am I doing wrong?
Thank you.
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303236
Got it! Perfecto! Thanks, Nathan!
Rick
----- Excess quoted text cut - see Original Post for more -----
Author: Nathan Strutz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303235
I think it's:
div.pagination { color:#F00; }
At the same time, make sure you specify colors for anything else it may
affect, such as:
div.pagination span { color:#0F0; }
----- Excess quoted text cut - see Original Post for more -----
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303230
Nathan...
I've customized the look of the pagination for paginationcfc
and it looks just the way I want, except I haven't figured out
what CSS controls the ellipsis.
How do I change the color of that?
Rick
----- Excess quoted text cut - see Original Post for more -----
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303177
>I knew I hear from you, Will! :o)
>Yep, that was the first file I've had on my system with a .cfc extension!
>
>I'm catching up, *slowly* but surely!
I pretty much knew your apps suffered from a lack of sexiness. Keep workin on it
I guess. :)
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303169
I knew I hear from you, Will! :o)
Yep, that was the first file I've had on my system with a .cfc extension!
I'm catching up, *slowly* but surely!
Rick
----- Excess quoted text cut - see Original Post for more -----
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303168
>Nathan,
>
>Just wanted to let you know that I implemented your component
>and it went perfectly...and that was the first cfc I've ever used!
My god son!! :)
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303167
Be my guest! I'm looking forward to using some of the
custom designs that you've created, as well!
Rick
----- Excess quoted text cut - see Original Post for more -----
Author: Nathan Strutz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303166
Awesome, glad it worked, thanks for the review. I'm blogging this. :)
On Thu, Apr 10, 2008 at 6:08 PM, Rick Faircloth <Rick@whitestonemedia.com>
wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303162
Nathan,
Just wanted to let you know that I implemented your component
and it went perfectly...and that was the first cfc I've ever used!
I haven't gone beyond the default settings, except for number of
records per page, but I'm sure customizing will go well, too.
Nice clear instructions for the use of the component.
Much appreciated!
Rick
----- Excess quoted text cut - see Original Post for more -----
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303146
Thanks for the tip, Sonny, I'll check it out!
Rick
----- Excess quoted text cut - see Original Post for more -----
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303147
Thanks for the tip, Nathan... I'll definitely check it out!
Rick
----- Excess quoted text cut - see Original Post for more -----
Author: Sonny Savage
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303142
Have you looked at this?
http://paginationcfc.riaforge.org/
On Thu, Apr 10, 2008 at 5:15 PM, Rick Faircloth <Rick@whitestonemedia.com>
wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Nathan Strutz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303140
Rick,
Check out my pagination.cfc:
http://www.dopefly.com/projects/pagination/
It's currently 1.0 RC, full release coming soon.
Check out the documentation & live examples (code available in the download)
to do basically exactly what you want.
--
nathan strutz
http://www.dopefly.com/
On Thu, Apr 10, 2008 at 2:15 PM, Rick Faircloth <Rick@whitestonemedia.com>
wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Rick Faircloth
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55982#303139
Anyone know of a tutorial that would teach me how
to setup pagination that would work like this:
< Previous 1 2 ... 8 9 [10] 11 12 ... 39 40 Next >
- Previous Link
- Next Link
- First one or two pages
- Last one or two pages
- Current Page (represented by the [10])
- Several links surrounding the current page
I've always used the basic "Previous Next" pagination, but I'd
like to advance that.
I looked online, but haven't found anything with all the specs,
or with enough of a start that I could figure the rest out.
I checked into a javascript approach, but dumping all the records,
perhaps thousands, would be a little much for the client, I think.
I'd be pulling records from a MySQL database.
Thanks,
Rick
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||