New function namespacedPage

inspired from page_findnearest() function