refactor pageTypeWithLayout using new api call canRenderLayout