{% load sidebar_menu %} {% if allowed %} {% comment %} The tree's root is a link. The link and the expand/collapse toggle are separate elements: AdminLTE toggles the tree when the toggle (the element right before the menu) is clicked, and the link works like any other link. {% endcomment %} {% if root_allowed %} {# Handle when tree root node is a valid url, which the user can open. #}