1

I'm building a slideshow using Grid and Low Variables. I have a checkbox to publish or hide the slide. What I can't figure out is how to get a count on the amount of items that are checked.

Using this:

{exp:low_variables:parse var="lv_homeslider" sort="random"}
    {lv_homeslider:checked}
{/exp:low_variables:parse}

total_rows returns 5, but I only have 2 checked. Any ideas how to get the number for rows where checked=true?

1 Answer 1

3

You can use the Search parameter to return only rows that have the checkbox cell checked.

{exp:low_variables:parse var="lv_homeslider" search:name_of_checkbox_cell="true"}  
    {total_rows}
{/exp:low_variables:parse}

"true" should be the actual value that you entered under "Multi-Select Options" in the checkbox field/cell settings.

1
  • Indeed, this would be the way to go.
    – Low
    Jun 3, 2014 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.