{% load wagtailmaterialize_tags %} {% if value.contents %} {% get_tag value.attributes as tag %}{% if not tag %}{% make_use_of materialize_tag as tag %}{% endif %} {% get_id value.attributes as id %} {% get_classes value.attributes as classes %} {% get_attributes value.attributes as attributes %} <{{ tag }} {{ id }} class="{{ materialize_class }}{% if value.color %} {{ value.color }}{% endif %}{% if value.text_color %} {{ value.text_color }}{% endif %}{% if classes %} {{ classes }}{% endif %}" {% for attribute in attributes %}{{ attribute }}{% endfor %}> {{ value.contents }} {% endif %}