Hi:
Maybe I’m overlooking something obvious?
I have the following code which works except that the header “Related Pages” and the ul tags are displayed even when no results are returned. Ideally I would like the entire “Related Pages” block to be gone and some alternative text to be displayed if there are no results. If I put the header inside the loop then it is displayed for every entry.
<h2>Related Pages</h2>
<ul>
{exp:tag:related_entries dynamic="off" limit="10" rank_method = "clicks|total_entries"}
{if no_results}
<h2>Some Other Content</h2>
<p>Lorem Ipsum</p>
{/if}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{/exp:tag:related_entries}
</ul>
I would rather do something like this:
{if related_entries}
<h2>Related Pages</h2>
<ul>
{exp:tag:related_entries dynamic="off" limit="10" rank_method = "clicks|total_entries"}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{/exp:tag:related_entries}
</ul>
{if:else}
<h2>Some Other Content</h2>
<p>Lorem Ipsum</p>
{/if}
Is something like this possible?
jerry
