Low variable filter by status?
Would like to use low variables with a preview template, but when we add the status parameter it breaks:
{exp:low_variables:parse var="lv_home_slides" limit="10" status='open|Preview'}
What is the correct way to filter by status?
Replies
Low 6 Jun 2013 22:40
What is the type of the lv_home_slides variable?
Sara Leavitt 6 Jun 2013 23:04
Playa (text field holding name of image file)
Low 6 Jun 2013 23:29
Might be a Playa issue, then. What happens when you use the Playa tag itself?
Sara Leavitt 7 Jun 2013 17:53
We have 3 instances of "lv_home_slides" one of which is set to "Preview." When we run the "exp:playa:children" code above loops 3 times and we get 3 sets of the Playa variable which contains all the instances, including the Preview instance. If we remove "Preview" then it loops twice and we get 2 complete sets including the preview instance.
So the loop is seeing the "Preview" status and is skipping output but on the other 2 loops it is still outputting all 3 instances. I think we need to parse the Playa variable within the loop or add an index to get only the non-Preview instances?
Low 8 Jun 2013 12:05
I'm still not quite sure what it is you're trying to accomplish from your description. Can you perhaps post some screenshots of the Low Variable settings in question, and some code you're using in your templates? You can best use pastie.org for sharing code. Thanks.
Sara Leavitt 9 Jun 2013 00:09
We did another test in a brand new template and both playa and lv work fine with the status filter, so must be something else about the template that is messing it up. Thanks for now!