I made this little example on jsfiddle to explain how the method of pagination in layouts works (this is the method I see most layouts using/ the way I first learned). Hope this helps someone else! 
https://jsfiddle.net/h9zt4cwx/
https://jsfiddle.net/h9zt4cwx/












































