Closed sottwell closed 4 months ago
The "toggle" type returns "1" for true and empty "" for false.
<a class="btn btn-primary" href="/" data-fred-render="">Call to Action!</a>
<a class="btn btn-primary" href="/" data-fred-render="1">Call to Action!</a>
I just noticed this as well, glad I'm not alone. The false value isn't returned until the theme is rebuilt.
https://community.modx.com/t/fred-toggle-not-returning-false-value/3667
Still an issue in Fred 2.2.3
{% if toggle %}<a class="btn btn-primary" href="/">Call to Action!</a>{% endif %}
or <a class="btn btn-primary" href="/" data-fred-render="{% if toggle %}1{% else %}0{% endif %}">Call to Action!</a>
Option type "toggle" doesn't appear to work. The item will have the default value, whether true or false, but switching the toggle has no effect.
Changing the type to "text" and entering true or false in the text field works as expected.