IF statement inside nested repeaters
-
One other quick question.
Inside of my nested repeaters, if the “exercise_name” field has “Off” as a value, I would like the url link to be inactive as the “exercise_post_id” will be 0. Otherwise if there is any other value than “off” in the “exercise_name” then the link should embed the “exercise_post_id”. Conversely it could also work to see if the “exercise_post_id” has a value of “0” and eliminate the link and just show the “exercise_name”.
I have tried the scenario below but cannot get it to work. I have removed the outer tags on the link to post in here:
[raw]
[repeater field=”program_day” num=”2″]
[-repeater field=”exercise”]
[if field exercise_name value=”off”]
[field exercise_name]
[else]
a href=”index.php?p=[field exercise_post_id]”>[field exercise_name]
[/if]
[/-repeater]
[/repeater]
[/raw]
- The topic ‘IF statement inside nested repeaters’ is closed to new replies.