我在 Pyramids Framework 和 TAL 中使用 Chameleon。不幸的是,TAL 删除了每个标签,直到第一个标签。
HTML 模板:
<label tal:attributes="for item.id">
<span i18n:translate="Because:" tal:condition="item.leading_because">Because:</span>
<span tal:repeat="premise item.premises" tal:attributes="for item.id; id premise.id">
<span tal:attributes="for item.id; id premise.id" tal:content="premise.title">premise</span>
<span tal:condition="not:repeat.premise.end">
<i><span i18n:translate="and"> and </span></i>
</span>
</span>
</label>
渲染示例:
<li>
<input type="radio" name="discussion-button-group" onclick="location.href="http://localhost:4284/d/cat-or-dog/r/11/undermine/29"" id="11">
<label for="11">
Because: Cats are fluffy and Cats are small
</label>
现在我错过了“因为......”中的所有跨度标签,有人知道,为什么?
谢谢