我有一个包含几个相同列的布局,这些列应该屈服于各个部分:
<div class="column_1">
some column content here
{{ yield:column_1 }}
some more column stuff
</div>
<div class="column_2">
some column content here
{{ yield:column_2 }}
some more column stuff
</div>
...
现在我想把它放到它自己的部分:
****** LAYOUT ******
{{ partial:column column_name="column_1" }}
{{ partial:column column_name="column_2" }}
...
****** PARTIALS/COLUMN.HTML ******
<div class="{{ column_name }}">
some column content here
{{ yield to-section="{column_name}" }}
some more column stuff
</div>
****** TEMPLATE *****
{{ section:column_1 }} **Additional stuff for column 1** {{ /section:column_1 }}
{{ section:column_2 }} **Additional stuff for column 2** {{ /section:column_2 }}
但在文档中,我只能找到冒号语法{{ yield:section }}
,而没有提示可能的变量语法{{ yield unknown_word_here="section" }}
。大多数标签都有可变语法,所以我希望有一个。或者其他解决方案...