我想通过html_tag变量更改此h1 HTML标签。我该怎么办?
{% set html_tag = field("html_tag") %}
<h1 class="element-headline">
<div class="element-headline-text">
<span class="headline-before-text">{{ before_text }}</span>
<span class="headline-after-text">{{ after_text }}</span>
</div>
</h1>
答案 0 :(得分:2)
和
{% set html_tag = field("html_tag") %}
<{{html_tag}} class="element-headline">
<div class="element-headline-text">
<span class="headline-before-text">{{ before_text }}</span>
<span class="headline-after-text">{{ after_text }}</span>
</div>
</{{html_tag}}>
不起作用?