Skip to content

Instantly share code, notes, and snippets.

View 18thAvenue's full-sized avatar

Risto 18thAvenue

View GitHub Profile
@18thAvenue
18thAvenue / snippets.cson
Last active November 12, 2018 18:23
CFWheels Atom editor cfscript snippets
#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.
@18thAvenue
18thAvenue / functions.cfm
Created December 9, 2016 16:33
CFWheels Bootstrap 4 Pagination Function (Tag Based)
<!---
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. --->
@18thAvenue
18thAvenue / functions.cfm
Last active November 12, 2018 18:24
CFwheels Bootstrap 4 Pagination Links
<!--- 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">'