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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
gautamz07
Forum Contributor
Posts: 331
Joined: Wed May 14, 2014 12:18 pm

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

Post 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.
Post Reply