{% macro render_options(k, cat, selected, depth) %}
	{% set id = cat.id|default(k) %}
	{% if not cat.name is defined %}
            {% set title = cat.symbol|default(cat.symbol|default(cat)) %}
        {% else%}
            {% set title = cat.name|default(cat.name|default(cat)) %}
        {%endif%}
	<option value="{{ id }}" {% if id == selected %}selected="selected"{% endif %}>{% if depth %}{{ '--'|repeat(depth) }} {% endif %}{{ title }}</option>
	
{% endmacro %}
<select {% if name %}name="{{ name }}"{% endif %} {% if id %}id="{{ id }}"{% endif %} class="{{add_classname}}" {{ add_attr }}>
	{% if with_blank %}<option value="">{{ blank_title }}</option>{% endif %}
	{% for k,cat in options %}
		{{ _self.render_options(k, cat, selected, 0) }}
	{% endfor %}
</select>


