We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

choosing tag pair using if statement

Development and Programming

chrisd66's avatar
chrisd66
2 posts
13 years ago
chrisd66's avatar chrisd66

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.