This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Modified Chris Peters pagination function in https://github.com/liquifusion/bootstrap-cfwheels/blob/master/Bootstrap.cfc ---> | |
<cffunction name="b4PaginationLinks" returntype="string" hint="Bootstrap 4 markup version of the Wheels `paginationLinks` view helper."> | |
<cfscript> | |
var loc = {}; | |
loc.paginationArgs = Duplicate(arguments); | |
loc.paginationArgs.prepend = '<ul class="pagination">'; | |
loc.paginationArgs.append = '</ul>'; | |
loc.paginationArgs.prependToPage='<li class="page-item">' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
Instructions: Place this function in functions.cfm | |
In your findall(): | |
myquery=model("Mymodel").findAll(page=params.page, perPage=params.perpage,handle="myHandleName"); | |
In your view template place this code for the pagination links: | |
#bs4Pagination(paginationHandle="myHandleName",activepage="#params.page#",params="Not Required(optional params)")# | |
You can see in function arguments other parameters you can pass in from the bs4Pagination() function. ---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Cfwheels Snippets for Atom Editor | |
#I love Atom editor and thought it would be nice to have snippets for CFwheels while writing in script. | |
#My setup: | |
#Install language-cfml package | |
#Install Atom-Beautify package | |
#Go to File > Snippets > Paste all or just a few of the snippets into your snippets.cson file. |