Here is a trick that helps stop executing code further down and get back one level 'up'. It employs tag <cms:each> with a single argument that makes 'each' run once. Only tag 'each' supports tags <cms:break /> and <cms:continue />, so one or the other will stop the execution of the code wrapped in 'each' situated below those tags.
A quick demo where the third 'dump' does not get executed due to 'break'.
I will add a more practical demo once I see again a good example.
A quick demo where the third 'dump' does not get executed due to 'break'.
- Code: Select all
<cms:each '1'>
<cms:dump />
<cms:dump />
<!-- return -->
<cms:break />
<cms:dump />
</cms:each>
I will add a more practical demo once I see again a good example.