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.

entry tag inside (if no_related_entries)

May 06, 2008 7:33pm

Subscribe [2]
  • #1 / May 06, 2008 7:33pm

    redmercer

    35 posts

    I am trying to call an entry tag inside the {if no_related_entries} condition.  For some reason it outputs that actual tag, {title}, as opposed to what has been entered into the field.  Can you actually use a tag within this condition or does it only accept html like in the ee docs example.

    http://expressionengine.com/docs/modules/weblog/related_entries.html

    {exp:weblog:entries weblog="staffbio"}               
    
    {related_entries id="bio"}
    {if no_related_entries}
      {title}
    {/if}
      <a href="http://index.php?/staff/staffbio/{url_title}">{title}</a>
    
    {/related_entries}
    {/exp:weblog:entries}
  • #2 / May 06, 2008 8:55pm

    redmercer

    35 posts

    Disregard the question.  I ended up doing the following instead. 

    {exp:weblog:entries weblog="staffmember"}               
    
    {if staffbiography==""}
    {title}
    
    {if:else}
    <a href="http://{permalink=biography}">{title}</a>
    
    {/if}
    
    {/exp:weblog:entries}
  • #3 / May 06, 2008 8:55pm

    Sue Crocker

    26054 posts

    So is everything OK, and I can close the thread?

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

ExpressionEngine News!

#eecms, #events, #releases