Context
Context. Navigation belongs to editors, so it comes from an admin menu, not from links in a template. _menu->get() loads a menu by its exact name; renaming it in the admin empties your navigation, so always check for nothing. Each element has a URL, a name and children. To highlight the current item, ask _url->isCurrentPath() for an exact match, and compare the path prefix so a section stays highlighted on its child pages. Menu elements are publishable: an unpublished one is hidden from visitors but visible to a signed-in admin, which explains "the menu has an item I cannot see".