I want to use sightly data-sly-test to "split" a list, but when I try to close/re-open the <ul> using a condition, the html doesn't get added in the correct place... This is essentially the code I am trying to render (simplified for demo purposes):
content to be placed in between li items on condition
If I leave like this, the code finished looping through the list before it includes the code in the data-sly-test. If I remove the </ul> it includes the code in the correct place (after the li where the condition is true, but before the next li).
Is there a reason this is occurring? is there a way around it??