I’m sorry if this has been posted before. I searched the forum but did not find anyone who had this exact problem. I’m trying to create a list of entries using the exp:weblog:entries tag to generate a list of items corresponding to 1 particular weblog.
However, I’m also trying to display the category under which each of these weblog entries falls. I have 4 different categories and my weblog entries all fall into one of them.
Here is my problem, I can’t figure out how to pass the correct category value corresponding to each entry. Instead all 4 categories are showing up. Can somebody please look at my code and tell me what I’m doing wrong?
{exp:weblog:entries weblog="{test_project}" limit="20" status="Open|Closed"}
{if count == "1"}
<table>
<tr>
<th>ID</th>
<th>Status</th>
<th>Category</th>
<th>Title</th>
</tr>
{/if}
<tr>
<td><a href="http://{permalink=test_project/detail}?id={entry_id}">{entry_id}</a></td>
<td>{status}</td>
<td>{exp:weblog:categories weblog="{test_project}"}{category_name}{/exp:weblog:categories}</td>
<td>{title}</td>
</tr>
{if count == total_results}
</table>
{/if}
{/exp:weblog:entries}It looks to me like the categories tag doesn’t know how to recognize which entry_id is being parsed so it’s just spitting out all the categories available (which is, in fact, what is happening). Am I missing an if statement or something?