[英]“Block”-type template functions
使用http/template
是否可以定义一个类似于内置的define
或range
的“块”型函数? 例如,我想制作一个功能如下:
<div class="page">
{{doThing}}
Large amount of text here...
{{end}}
</div>
我知道我可以使用{{ doThing "Large amount of text here..." }}
使其工作,但这并不是我想要的。
不能编写类似于内置的define或range动作的块类型函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.