|
Hi Mark-
I’ve got a case where a nested switchee and all its tags are just getting output as text, rather than getting parsed. It’s a bit of a complicated scenario so that may be it.
Basically, I’m setting a stash variable for some content inside a matrix row which has a playa field in it. The nested switchee is inside the playa field. Here’s the code:
{stash:section-page-content} {sp-items-matrix} {exp:switchee variable="{pi-type}" parse="inward"} {case value="topics"} {pi-items-playa}
<div class="{switch='topic-row showleft|topic-row'}"> {switchee variable="{spt-media-type}" parse="inward"} {case value="image"} <h2>{spt-media-type}</h2> {/case} {case value="zoom"} <h2>{spt-media-type}</h2> {/case} {/switchee} </div> <!-- topic-row --> {/pi-items-playa} {/case} {/exp:switchee} {/sp-items-matrix} {/stash:section-page-content}
Here’s what the output for the switchee looks like (unstyled of course):
{switchee variable="zoom" parse="inward"} {case value="image"} zoom {/case} {case value="zoom"} zoom {/case} {/switchee}
I can handle everything for this situation using {if}s, but If there is something wrong with my approach I’d like to know it. I have successfully used nested switchee statments in the past.
Thanks!
|