(Slavishly) following the instructions and sample code in a tutorial, I set up the following code intended to return up to three related articles for each posted article. However, when I substituted the expression engines tags for the html code originally provided, the rendering comes back with “Related Articles” blank.
I suspect that it has something to do with where the “close” tag is being placed—if I move it in front of the </div> expression, it comes back empty. If I move it behind the </div> expression, it comes back with the raw code for the title, author, and article_excerpt fields where the text for those entries should be. But neither approach will return the actual article excerpts (even though it worked famously when I had sample text in the template instead of the expression engine tags). Here is the code for that section (BTW, categories are “on” and I intentionally made sure that there were at least two other articles assigned to this category—so there should be content to come back, unless there is some other step I’ve missed.)
<div id="related-articles">
<h3>Related Articles</h3>
{exp:weblog:entries weblog="news_articles" limit="3" related_categories_mode="on" custom_fields="on" status="Open|Top Story|Featured Top Story"}
{if no_results}
<p>There are no related articles</p>
{/if}
<div id="{switch="lcol|mcol|rcol"}">
<h4>{title}</h4>
<h5><span class="by">By</span> {author}</h5>
{article_excerpt}
<p><a href="{title_permalink=" class="read_story">Read Story</a></p>
{/exp:weblog:entries}
</div><!-- END #related-articles -->
