changed getPageLayout to get the correct parent