Created
July 17, 2012 18:02
-
-
Save thadd/3130872 to your computer and use it in GitHub Desktop.
Update for paginate liquid drop in Locomotive Editor
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
pagination = {} | |
pagination['collection'] = collection.send(:paginate, { | |
:page => context['current_page'], | |
:per_page => @per_page }) | |
pagination['current_page'] = pagination['collection'].current_page | |
pagination['per_page'] = pagination['collection'].per_page | |
pagination['total_entries'] = pagination['collection'].total_entries | |
pagination['next_page'] = pagination['collection'].next_page | |
pagination['previous_page'] = pagination['collection'].previous_page | |
pagination['total_pages'] = pagination['collection'].total_pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment