I have the following code:
{if group_id == "1"}
{preload_replace:set_status="Open|Draft"}
{if:else}
{preload_replace:set_status="Open"}
{/if}
{group_id}
{set_status}
{exp:channel:entries channel="products" status="{set_status}"...The problem I am having is that whatever group_id is, set_status is always “Open”.
I gather that this is because of the order that things are parsed?
What possible solution is there for this? Is it possible to set variables based on the outcome of an if statement?
Additional:
I am trying to achieve this:
http://richhayler.com/articles/article/display_draft_entries_before_publishing_live
I presume the author managed to get it to work but from my tests it seems to be fundamentally flawed unless I am missing something obvious