How can I check in Twig if an advanced theme setting option is unchecked? I've a list of advanced theme option(checkbox) to not display, such as search bar.
I did many research about custom advanced theme setting, but all the samples are
{% if remove_searchbar %}{% endif %}. This render if the option is checked but I want the opposite.
How do I make a statement for if an option is unchecked? I really don't want to do {% if remove_searchbar %}{% else %}{% endif %} or make everything checked by default.
The following answer is credited to @leymannx.
{% if not remove_searchbar %}
  do something
{% endif %}

After some research I found twig syntax. You also can find the &quot;if statement&quot; syntax and samples on Twig Symfony website.