{% load materialize_nav %}
<ul id="sidebar" class="sidenav {% if FixedSidebar %}sidenav-fixed{% endif %}">
    {% render_user_background request.user %}

    {% if SearchURL %}
        {% render_sidebar_search %}
    {% endif %}

    <ul class="collapsible expandable">
        {% for key, navitem in AppNavigation.items %}
            <!-- App Navigation -->
            {% if navitem.is_header %}
                {% render_sidebar_navheader navitem %}
            {% else %}
                {% render_sidebar_navitem navitem is_header=True %}
            {% endif %}
        {% endfor %}
    </ul>
</ul>


<script type="text/javascript">
    $( document ).ready(function(){
        $('.sidenav').sidenav();
        $('.collapsible').collapsible();
        $('.collapsible.expandable').collapsible({
            accordion: false
        });
    });
</script>
