{%- macro leaf_item(leaf, url) %}
<li id="category_{{ leaf.getId() }}">
<div class="item">
<span class="title">{{ leaf.getTitle() }}</span>
<span class="info">({{ leaf.getSlug() }})</span>
<a href="{{ url }}category/admin/edit/{{ leaf.getId() }}"><i class="icon edit"></i></a>
<a href="javascript:void(0);" onclick="deleteCategory({{ leaf.getId() }}, this)" class="delete"><i class="icon trash"></i></a>
</div>
{% if leaf.hasChildren() %}
<ol>
{% for child in leaf.children() %}
{{ leaf_item(child, url) }}
{% endfor %}
</ol>
{% endif %}
</li>
{%- endmacro %}
<div class="ui blue segment">
You can drag and drop tree elements to change order and relations
</div>
{% for root, root_title in roots %}
<div class="ui blue segment">
<h3>{{ root_title }}</h3>
<ol class="sortable" id="root_{{ root }}">
{% set tree = category_helper.treeUpperLeafs(root) %}
{% for leaf in tree %}
{{ leaf_item(leaf, url.get()) }}
{% endfor %}
</ol>
<a class="save ui button primary" id="save-root-{{ root }}" data-root="{{ root }}">
<i class="save icon"></i> Save
</a>
<a href="javascript:void(0);" data-root="{{ root }}" class="add ui button positive">
<i class="icon plus"></i> Add
</a>
</div>
{% endfor %}
I use macro volt template, but I can't open the page from yesterday. On my brower it's showing :
This site can’t be reached
The connection was reset. Try: Reloading the page Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET
....
If I delete endmacro block on view template, the page is available.
So, May I know what happend ? how to fix it ?