Improve navbar gestion in templates factories