{% load i18n %} {% with profile=object.userprofile %} {% block side_menu %} {% if can_edit %} {% endif %} {% endblock side_menu %} {% endwith %}