verbb / vizy

A flexible visual editor for Craft CMS
Other
44 stars 8 forks source link

Add template partials for nodes #29

Open engram-design opened 3 years ago

engram-design commented 3 years ago

Similar to template partials for vizy block types, being able to supply a template partial for all nodes.

For example, being able to supply a template for Lists or Paragraph nodes, to make use of automatic rendering, and not having to set classes at render time.

This would allow you to keep node templating DRY, something like:

<ul class="list-disc">
  {% for item in node.attrs.content.marks %}
    <li>{{ item.content }}</li>
  {% endfor %}
</ul>