I am looping through an object in my View, and would like to recreate the following PHP code in Volt:
echo isset($_GET['param']) ? 'class="active"' : '';
How would I go about (a) getting this parameter with Volt, and (b) recreating that line of code with Volt syntax?
Current code:
{% for (item in object) %}
<li>{{ link_to('index/browse/' ~ item.id, '<i class="fa fa-caret-right"></i>' ~ item.id) }}</li>
{% endfor %}
The Volt code will need to go between <li
and >