refactor(templatePage): add flow

steps from page loading to attaching events

time: 0h:40