Refactor display template for navbar