SilverStripe3: Multiline comments in template

元气小坏坏 提交于 2019-12-13 06:07:51

问题


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


回答1:


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 %>


来源:https://stackoverflow.com/questions/12739970/silverstripe3-multiline-comments-in-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!