Added logic around next/previous links, hide previous if pageID zero.