setting pageType based on URL path