SilverStripe3: Multiline comments in template

2019-09-14 17:06发布

In SilverStripe 3, How can I put multiline comments in template file ?

1条回答
叼着烟拽天下
2楼-- · 2019-09-14 17:24

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 %>
查看更多
登录 后发表回答