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.

conditional statements

May 21, 2008 5:47pm

Subscribe [2]
  • #1 / May 21, 2008 5:47pm

    project_digital

    37 posts

    I thought this should work, but it doesn’t - I’m trying to do conditional statements if a title == a certain title then the link goes to this weblog entry else just create a permalink to itself.

    {if title=="This"}
    <a href="http://{path=">{title}</a>
    {if:elseif title=="This & That"}
    <a href="http://{path=">{title}</a>
    {if:else}
    <a href="http://{permalink=">{title}</a>

    I have a EE tag that lists the titles of entries, and then that title links to that certain weblog. However, a couple of the titles need to be linked to a different weblog other than its own. The above code makes everything link to the practices/103 even if the title doesn’t ==“This”

  • #2 / May 21, 2008 7:29pm

    Sue Crocker

    26054 posts

    Is there a closing if?

    {/if}

  • #3 / May 21, 2008 9:28pm

    project_digital

    37 posts

    Yes there is, sorry I forgot that in the post

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

ExpressionEngine News!

#eecms, #events, #releases