I am trying to do the following and it is not working. EE doesn’t seem to execute either of the tags within the ‘if’ clause.
{if "{embed:source}” == “upsell”} {exp:myplugin action="upsells/getUpsells"} {/if} {if "{embed:source}” != “upsell”} {exp:myplugin action="products/getProducts"} {/if}
display logic
{/exp:myplugin}
Is there another way to do this? I do not want to create 2 templates because the display logic is the same for both result sets. I would also like to avoid having 2 giant if blocks in the same template for the same reason. Does anyone have an idea on how to make this work? Thanks.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.