Page 1 of 1

what is if not and ct.viewless|default(false) in twig ??

Posted: Sun Sep 25, 2016 4:43 pm
by gautamz07
I just came across the following syntax in the bolt CMS :

Code: Select all

{% for ct in app.config.get('contenttypes') if not ct.viewless|default(false) %}
Now the start of the loop seems familiar PHP syntax but the part where the below comes into the picture:

Code: Select all

 if not ct.viewless|default(false)
Now That part is a bit harder to understand , what is that part of the code really doing ??

or actually what is that part of the code really saying ??


Thank you.
Gautam.

Re: what is if not and ct.viewless|default(false) in twig ?

Posted: Mon Sep 26, 2016 6:34 am
by Celauran