paginationLinks() with bootstrap css framework

131 views
Skip to first unread message

Rufhausen

unread,
Sep 8, 2011, 4:11:33 PM9/8/11
to cfwh...@googlegroups.com
I'm trying to integrate paginationLinks() with the new Bootstrap CSS framework from Twitter (http://twitter.github.com/bootstrap/). 

The problem I'm having is I need to assign the classForCurrent param to <li> instead of <a>. 

Is there a workaround to make this possible?

Snippet of current code:
<div class="pagination">
#paginationLinks(
linkToCurrentPage=true,
prepend="<ul><li class=""prev #dp#""><a href=""?page=#p#"">&larr; Previous</a></li>",
append="<li class=""next #np#""><a href=""?page=#n#"">Next &rarr;</a></li></ul>",
prependToPage="<li>", 
appendToPage="</li>", 
classForCurrent="active", 
anchorDivider="",
pageNumberAsParam=true)#
</div>

Jordan Clark

unread,
Sep 8, 2011, 7:50:56 PM9/8/11
to cfwh...@googlegroups.com
Wow this bootstrap framework is pretty awesome, thanks for pointing it out!

You could probably just slightly modify the bootstrap CSS file to change the selector, from:

.pagination a:hover, .pagination .active a {
  background-color: #c7eefe;
}

To:

.pagination a:hover, .pagination a.active {
  background-color: #c7eefe;
}

I haven't tested, let me know if it works



Cathy Shapiro

unread,
Sep 9, 2011, 12:27:58 AM9/9/11
to cfwh...@googlegroups.com
+1
Bootstrap looks really nice - like Blueprint but better! Love that it has basic navigation and the modals and tooltips are waay cool.




--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/00CgGZq_4f8J.

To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.



--
Flash Pro Design
4646 Poplar, Suite 517
Memphis, TN 38117

Phone: (901) 767-8767
Fax: (901) 685-9054

http://www.flashprodesign.com

Tom King

unread,
Sep 9, 2011, 6:11:51 AM9/9/11
to cfwh...@googlegroups.com
I love blueprint - but I'm properly tempted by both LESS support and all those nice buttons/dialogues within bootstrap :)

Troy Murray

unread,
Sep 9, 2011, 10:32:08 AM9/9/11
to cfwh...@googlegroups.com
I feel the same way you do about it Tom. I'm new to the LESS thing,
although I found a really nice Mac app for it
(http://incident57.com/less/), but does anyone know how to adjust
Bootstrap to use a 24 column grid instead of the 16 column grid?

On Fri, Sep 9, 2011 at 6:11 AM, Tom King <t...@oxalto.co.uk> wrote:
> I love blueprint - but I'm properly tempted by both LESS support and all
> those nice buttons/dialogues within bootstrap :)
>

> --
> You received this message because you are subscribed to the Google Groups
> "ColdFusion on Wheels" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/cfwheels/-/Pb2usernC1wJ.


> To post to this group, send email to cfwh...@googlegroups.com.
> To unsubscribe from this group, send email to
> cfwheels+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cfwheels?hl=en.
>

--
Troy Murray

tpet...@gmail.com

unread,
Sep 11, 2011, 8:39:26 AM9/11/11
to ColdFusion on Wheels
off the top of my head, what you could do is use jquery to remove the
classForCurrent from the anchor and move them to the lis:

(function(){

$(".pagination").find("a.active").each(function(i){
$(this).removeClass('active').parent('li').addClass('active');
});

});
Reply all
Reply to author
Forward
0 new messages