Man*_*olo 1 html comments symfony twig
我在所有文件(js,css,php,...)中添加了许可文本,但是在尝试在.html.twig
文件中添加文本时遇到了麻烦.我试过以下代码:
<!--
Itransformer.es is an online application to transform images
Copyright (C) 2013 Manolo Salsas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: manolez@gmail.com - http://msalsas.com
-->
{% extends 'MSDHomeBundle::base.html.twig' %}
{% block javascripts %}
...
Run Code Online (Sandbox Code Playgroud)
我收到这个错误:
A template that extends another one cannot have a body in MSDHomeBundle:Home:index.html.twig at line 2.
Run Code Online (Sandbox Code Playgroud)
我之后也试过添加它{% extends 'MSDHomeBundle::base.html.twig' %}
,但是我得到了同样的错误.
怎么解决它的想法?
树枝中的评论如下: {# <comment> #}
您可以将许可证/作者信息添加到twig文件,如下所示:
{#
@author Firstname Lastname
@copyright 2013
LICENSE:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
...
#}
{% extends 'MSDHomeBundle::base.html.twig' %}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
752 次 |
最近记录: |