PHP Developers Network
http://forums.devnetwork.net/

what is if not and ct.viewless|default(false) in twig ??
http://forums.devnetwork.net/viewtopic.php?f=1&t=142979
Page 1 of 1

Author:  gautamz07 [ Sun Sep 25, 2016 4:43 pm ]
Post subject:  what is if not and ct.viewless|default(false) in twig ??

I just came across the following syntax in the bolt CMS :

Syntax: [ Download ] [ Hide ]
{% 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:

Syntax: [ Download ] [ Hide ]
 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.

Author:  Celauran [ Mon Sep 26, 2016 6:34 am ]
Post subject:  Re: what is if not and ct.viewless|default(false) in twig ?

http://twig.sensiolabs.org/documentation

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/