implemented dynamic page layout from the pagesettings