<br />
<b>Warning</b>:  The magic method SFML_Singleton::__wakeup() must have public visibility in <b>/home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php</b> on line <b>72</b><br />
{"id":233,"date":"2018-01-16T17:20:25","date_gmt":"2018-01-17T00:20:25","guid":{"rendered":"http:\/\/www.munderwood.ca\/?p=233"},"modified":"2018-01-16T17:20:25","modified_gmt":"2018-01-17T00:20:25","slug":"ember-pagination-links","status":"publish","type":"post","link":"https:\/\/www.munderwood.ca\/index.php\/2018\/01\/16\/ember-pagination-links\/","title":{"rendered":"Ember pagination links"},"content":{"rendered":"<p>An Ember project I&#8217;m working on needed a simple set of links to move through a paginated JSON API. There are a few pagination-related addons out there, but they tend to want to deal with your data and model collections, as well as the display of pagination links. I was looking for something that would simply update the page parameter sent to the back end, and display links to other pages accordingly. The task seemed like the perfect excuse to build my first fully fledged Ember addon,\u00a0<a href=\"https:\/\/www.npmjs.com\/package\/ember-pagination-links\">ember-pagination-links<\/a>.<\/p>\n<p>By default, the addon creates a set of basic links with a configuration maximum number of pages to display at once, and arrows for navigating page by page and to the start and end of the list:<\/p>\n<p><img loading=\"lazy\" class=\"size-medium wp-image-234 aligncenter\" src=\"http:\/\/www.munderwood.ca\/wp-content\/uploads\/2018\/01\/unstyled-300x29.png\" alt=\"\" width=\"300\" height=\"29\" srcset=\"https:\/\/www.munderwood.ca\/wp-content\/uploads\/2018\/01\/unstyled-300x29.png 300w, https:\/\/www.munderwood.ca\/wp-content\/uploads\/2018\/01\/unstyled.png 397w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Each number except the current page is a link that will invoke an action, passing it the clicked value. Everything is classed for easy styling, and the icons to use for arrows and ellipses are configurable strings:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-235\" src=\"http:\/\/www.munderwood.ca\/wp-content\/uploads\/2018\/01\/styled-300x29.png\" alt=\"\" width=\"300\" height=\"29\" srcset=\"https:\/\/www.munderwood.ca\/wp-content\/uploads\/2018\/01\/styled-300x29.png 300w, https:\/\/www.munderwood.ca\/wp-content\/uploads\/2018\/01\/styled.png 448w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The documentation in the <a href=\"https:\/\/github.com\/mikeu\/ember-pagination-links\">readme<\/a> goes into more detail, and the <a href=\"https:\/\/github.com\/mikeu\/ember-pagination-links\/issues\">issue tracker<\/a> is open for business.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An Ember project I&#8217;m working on needed a simple set of links to move through a paginated JSON API. There are a few pagination-related addons out there, but they tend to want to deal with your data and model collections, as well as the display of pagination links. I was looking for something that would &#8230; <span class=\"more\"><a class=\"more-link\" href=\"https:\/\/www.munderwood.ca\/index.php\/2018\/01\/16\/ember-pagination-links\/\">[Read more&#8230;]<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[9,14,15],"_links":{"self":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/233"}],"collection":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":2,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}