Hi all -
I’m looking to have a page template pull from one of two possible channels, depending upon the {segment_3} variable. If the {segment_3} is equal to “associate”, I’d like to pull from a channel called “People”. If it’s not, I’d like it to pull from a channel called “StaticContent”.
Currently I’m using this code:
{preload_replace:cur_channel="{if segment_3 == 'associate'}People{if:else}StaticContent{/if}"}
{preload_replace:cur_page="{if segment_3 == 'associate'}{segment_4}{if:else}directory{/if}"}
{exp:channel:entries channel="{cur_channel}" url_title="{cur_page}"}If I hard code the preload_replace values everything works well, so I’m thinking that my approach to dynamically setting the value is faulty. Is this approach viable using EE markup, or do I need to introduce PHP in to the mix to pull it off?
Thanks in advance for your help.
-brian