SilverStripe3:模板中的多行注释 [英] SilverStripe3: Multiline comments in template
本文介绍了SilverStripe3:模板中的多行注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在SilverStripe 3中,如何在模板文件中添加多行注释?
解决方案
单行注释可以使用<%-- my comment --%>
(或将发送到浏览器,但不显示隐藏的html方式<!-- my comment -->
)完成. /p>
据我所知,silverstripe模板中没有多行注释.
很难解决的问题是<% if false %>
,就像这样:
<% if false %>
some
comment
text
here
<% end_if %>
In SilverStripe 3, How can I put multiline comments in template file ?
解决方案
single line comments can be done with <%-- my comment --%>
(or the html way <!-- my comment -->
which will be sent to the browser, but hidden not displayed.)
as far as I know, there is no multiline comment in silverstripe templates.
An ugly work around would be <% if false %>
, like so:
<% if false %>
some
comment
text
here
<% end_if %>
这篇关于SilverStripe3:模板中的多行注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文