I'm wanting to dynamically populate a switchee value, I've tried using an embed, but it seems the parse order means this won't work so I'm looking for aternative ideas, this is the code we've tried:
{exp:switchee variable="{segment_1}" parse="inward"}
{case value="{embed='site/_school-list'}"}
{redirect="/contribute/school/{segment_1}"}
{/case}
{case default="yes"}
Otherwise go here
{/case}
{/exp:switchee}
Basically I want to automatically pull out all of the entries from the school channel and get their {url_title}, then check it against {segment_1}.
The code in the embed is:
{exp:channel:entries channel="schools" dynamic="no" limit="99999"}{url_title}|{/exp:channel:entries}
Which is outputting correctly when tested.
Any ideas?