Text only
Twig Is field empty
/raw/c211c83ea29e36f093de8732d330112a/
c211c83ea29e36f093de8732d330112a
text
Text only
3
2025-04-04T11:39:54
True
False
False
Aug 02, 2017 at 05:02 PM
/api/public/snipt/14/
twig-is-field-empty
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a>
<a href="#L-2">2</a>
<a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>{% if content.field_example|render|striptags|trim %}
</span><span id="L-2"><a name="L-2"></a> <p>field is not empty</p>
</span><span id="L-3"><a name="L-3"></a>{% endif %}
</span></pre></div>
</td></tr></table>