<div
    {% if dom_id %}id="{{ dom_id }}"{% endif %}
    {% if ajax_url %}onclick="select_tab_profile(this,'{{ ajax_url }}'{% if owner_type %},'{{ owner_type }}'{% endif %})"{% endif %}
    {% if page_name == sel_page_name %}
        class="selected"
    {% endif %} >

    <img class="svg" src="{{ img_path }}" />
    {% if page_type and page_type == 'profile' or not sel_page_name %}
        <span class="text_btn_profile">
    {% else %}
        {% if sel_page_name == 'logout' %}
        	<a href="/profile/logout/" class="text_btn_profile">
        {% endif %}
        {% if sel_page_name != 'logoout' %}
        	<a href="{% url "profile_page" sel_page_name %}" class="text_btn_profile">
        {% endif %}
    {% endif %}
            {{ title }}
            {% if page_name == 'chat' or page_name == 'support' %}
                <div class="icon_unread_messages" style="padding-top: 0;">
                    <div class="cost-messages-in-user-tab-messenger">
                        <span class="unredmessages_value_text" style="padding-top: 2px;padding-left: 0;"></span>
                    </div>
                </div>
            {% endif %}
    {% if page_type and page_type == 'profile' or not sel_page_name %}
        </span>
    {% else %}
        </a>
    {% endif %}
</div>