ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

if:else evaluation

June 25, 2007 5:48pm

Subscribe [1]
  • #1 / Jun 25, 2007 5:48pm

    hothousegraphix

    851 posts

    I’ve got a menu item I’m passing the location variable in order to setup certain display conditions as such…

    <li {if '{embed:loc}' == 'blog' && member_group == "1"}class="schoolSelected"{/if}><a href="/blog">itemName_1</a></li>

    This works just dandy. However, I need to add a the same class to a second loc for each menu item.

    My problem is with the syntax. I’m not sure how it should look, when I simply add an {if:else} I get parsing errors. I’m not sure where I add the second set of conditions for my second location.

    I’m trying to do something like this -

    {if '{embed:loc}' == 'blog' && member_group == "1"}class="schoolSelected"
    {if:else}
    {'{embed:loc}' == 'events' && member_group == "1"}class="schoolSelected"
    {/if}

    could someone point me in the right direction?

    Thanks

  • #2 / Jun 25, 2007 6:03pm

    hothousegraphix

    851 posts

    Got it…I was missing the {if:elseif}.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases