I have a multi-select field in one of my channels named optional_widgets which I want to use in order to display additional widgets on my page.
I am currently using the following code in my display
{exp:channel:entries status="{open_statuses}"}
{optional_widgets}
{if "{item}" =="Events"}
{embed="widgets/calendar"}
{/if}
{if "{item}" == "eUpdate"}
{embed="widgets/eupdate"}
{/if}
{if "{item}" == "Testimony"}
{embed="widgets/testimony"}
{/if}
{if "{item}" == "Subscription"}
{embed="widgets/subscription"}
{/if}
{/optional_widgets}
{/exp:channel:entries}The if statements are working, but instead of seeing the embeded template, I see the text
{embed="widgets/subscription"}
I’ve even tried simplifying the code to be
{exp:channel:entries status="{open_statuses}"}
{optional_widgets}
{embed="widgets/subscription"}
{/optional_widgets}
{/exp:channel:entries}Which results in the same output.
The only way I can get the {embed} to works is by placing it outside the {optional_widgets} tags. This then defeats the purpose of giving the content admins the ability to enable or disable these widgets.
I need help in figuring out how to get this functionality working.