verbatim

verbatim

New in version 1.12: The verbatim tag was added in Twig 1.12 (it was named raw before).

The verbatim tag marks sections as being raw text that should not be parsed. For example to put Twig syntax as example into a template you can use this snippet:

{% verbatim %}
    <ul>
    {% for item in seq %}
        <li>{{ item }}</li>
    {% endfor %}
    </ul>
{% endverbatim %}

Note

The verbatim tag works in the exact same way as the old raw tag, but was renamed to avoid confusion with the raw filter.

© 2009–2017 by the Twig Team
Licensed under the three clause BSD license.
The Twig logo is © 2010–2017 SensioLabs
https://twig.sensiolabs.org/doc/1.x/tags/verbatim.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部