[templates] manage active class when navigating.