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.

Freebie + GWcode Categories - Conditional Not Working

January 07, 2013 10:33pm

Subscribe [2]
  • #1 / Jan 07, 2013 10:33pm

    upshot

    85 posts

    I’m having a big problem with Freebie + GWcode Categories.  I am totally stumped.  I have “locations” set up as a breaking segment in Freebie.  I then visit /locations/illinois.  The template is the following code:

    {exp:gwcode_categories  
        show="9" 
        style="linear"}
    
        test1-{cat_url_title}
        {if freebie_2 == "illinois"}
            test2
        {/if}
        {if freebie_2 == "{cat_url_title}"}
            test3
        {/if}
    
    {/exp:gwcode_categories}

    This outputs:

    test1-illinois
    test2

    Why won’t it display test3??  It makes zero sense…?  Clearly the {cat_url_title} is equal to “illinois” and so is {freebie_2}.  Can anyone lend an idea??  Banging my head against a wall here.

  • #2 / Jan 08, 2013 3:12pm

    MadWebDesigns

    147 posts

    Hi upshot,

    Can you try the following:

    {exp:gwcode_categories  
        show="9" 
        style="linear"}
    
        test1-{cat_url_title}
        {if "{freebie_2}" == "illinois"}
            test2
        {/if}
        {if "{freebie_2}" == "{cat_url_title}"}
            test3
        {/if}
    
    {/exp:gwcode_categories}

    If the above doesn’t work try using:

    ...
    {if "{exp:freebie:any name='illinois'}" == "true"}<h2>test2</h2><p>{/if}<br />
    {if "{exp:freebie:any name='{cat_url_title}'}" == "true"}</p><h2>test3</h2><p>{/if}<br />
    ...

    Also, what version of EE are you running?

    Cheers,

    Mike

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

ExpressionEngine News!

#eecms, #events, #releases