ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# `filter` Filter sections allow you to apply regular Twig filters on a block of templatedata. Just wrap the code in the special `filter` section: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3</pre></div></td><td class="code"><div class="highlight"><pre>{% filter upper %} This text becomes uppercase {% endfilter %} </pre></div></td></tr></table> You can also chain filters: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3 4 5</pre></div></td><td class="code"><div class="highlight"><pre>{% filter lower|escape %} &lt;strong&gt;SOME TEXT&lt;/strong&gt; {% endfilter %} {# outputs "&amp;lt;strong&amp;gt;some text&amp;lt;/strong&amp;gt;" #} </pre></div></td></tr></table>