0

I have had no luck in trying to sort a conditional that will only show the following if the category is not empty for the parent relationship.

<h3>ARTICLES</h3>
{parents orderby="date" sort="desc" channel="articles" category="1" status="not closed"}  
  <h4><a href="{parents:title_permalink="articles/view"}">{parents:title}</a></h4>
  <h5>{parents:article_author}</h5>
{/parents}

This is an online magazine table of contents. The parent relationship is the issue number. So I want to only displays articles in the TOC if there are any for that issue.

2

you can use:

{parents orderby="date" sort="desc" channel="articles" category="1" status="not closed"}  
  {if parents:count == "1"}<h3>ARTICLES</h3>{/if}
  <h4><a href="{parents:title_permalink=">{parents:title}</a></h4>
  <h5>{parents:article_author}</h5>
  {if parents:no_results}{/if}
{/parents} 

Regard's.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.