Generating Page Navigation

It is a small and unfinished example of how to generate page number
navigation, it is currently working for filter by category only, without
taking into consideration the search string, if there is one!