| {% macro dirTree(data, fullpath = "", cabin = "", depth = 0) %}
    <option {#
        #}{% if data.selected %}selected="selected"{% endif %} {#
        #}class="depth{{ depth|e('html_attr') }}" {#
        #}data-fullpath="{{
            (
                fullpath ~
                "/" ~
                data.url|e('url')
            )|e('html_attr')
        }}" {#
        #}data-cabin="{{ cabin|e('url') }}" {#
        #}value="{{ data.directoryid|e('html_attr') }}"{#
        #}>{{ data.url }}</option>
    {% if data.children %}
        {% for child in data.children %}
            {{ _self.dirTree(child, fullpath ~ "/" ~ data.url|e('url'), cabin, depth + 1) }}
        {% endfor %}
    {% endif %}
{% endmacro %}
 |