cleaner approach to fetch the page layout