Retired Documentation:  You are using the documentation for version 1.7.3 which was retired in 2013. Go here for the latest version documentation or check here for your available upgrades to the latest version.

Tags within Advanced Conditionals

When using an opening tag within an advanced conditional, additional conditions do not effect output.

Advanced Conditionals and Tags

When using ExpressionEngine tags within Advanced Conditionals the entire tag block must be contained within the conditional. Advanced Conditional [i]cannot[/i] be used to specify different opening tags, with shared markup for the rest of the tag block.

Right:

{if segment_3 == "foo"}
{exp:weblog:entries weblog="default_site"}
<h2>{title}</h2>
{/exp:weblog:entries}
{if:else}
{exp:weblog:entries weblog="another_weblog" category="not 6|7"}
<h2>{title</h2>
{/exp:weblog:entries} {/if}

Wrong:

{if segment_3 == "foo"}
{exp:weblog:entries weblog="default_site"}
{if:else}
{exp:weblog:entries weblog="another_weblog" category="not 6|7"}
{/if}
<h2>{title}</h2>
{/exp:weblog:entries}

Top of Page