Open weber-s opened 11 months ago
You could override the template. But if you want to be sure to keep same "required code" (JS, some attrs...) you could do a PR to add three variables:
container_tag
(default to div) container_class
(default to dalec-list)container_extra_attrs
(default to empty)with those variables added, you could do this:
{% extends dalec/default/list.hml %}
{% block dalec_list_body %}
{% with container_tag="section" %}
{{ block.super }}
{% endwith %}
{% endblock dalec_list_body %}
In your PR, you could also move the JS part inside a 3rd block named dalec_list_js
The list (https://github.com/webu/dalec/blob/main/dalec/templates/dalec/default/list.html) is hardcoded to be into a "div". What if we want another tag (i.e. "section") or having item as "li" into a "ul" ?
Right now it is not possible without overiding the whole template. It would be nice to be able to customize the markup, without the needed JS part.