How to use ternary operator in volt for below example
{% pageType == 'basicSetting' ? 'class="active"' : '' %}
To output a value use {{ and }} not {%%}
{{
}}
{%%}
I want to use ternary operator....give me proper example
What I meant is that your sentence makes no sense, you are using the ternary operator well, but not tags
Try
{% set pageType = 'basicSetting' %} {{ pageType == 'basicSetting' ? 'class="active"' : '' }}
working thnx