refactoring: detect page name in layout instead of view