factoring page header into main template