better way of doing the navigation with one template