This is driving me crazy.
I am using the weblog:entries tag to display content from the URL based on the category or url_title found in the URL. The URL comes from the weblog:categories tag.
Everything is fine for childless categories; I only get one entry displayed.
However, for parent’s, I get the full shebang, all entries. I feel like parent_only=“yes” should be viable in the weblog:entries parameters, but of course it doesn’t seem to do anything.
Here is the relevant template code:
{exp:weblog:entries weblog="emergency_planning" dynamic="on" parent_only="yes"}
{if no_results}
<h3 class="page_title">404 Not Found</h3>
The requested content was not found.
{/if}
{if category_request}
{categories}
{if "C{category_id}" == "{segment_3}"}
<h1 class="page_title">{title}</h1>
<h3 class="page_subheading">{article_subheading}</h3>
{article_body}
Posted on {entry_date format="%M %d, %Y - %h:%i %A"}
{/categories}
{/if}
{if not_category_request}
<h1 class="page_title">{title}</h1>
<h3 class="page_subheading">{article_subheading}</h3>
{article_body}
Posted on {entry_date format="%M %d, %Y - %h:%i %A"}
{/if}
{/exp:weblog:entries}As you can probably tell, I have even tried testing for and limiting only the category in the URL itself, but that doesn’t work.
If I set weblog:entries to limit=“1”, I get the first child entry content, but that’s not the right content.
How do I get it to select only the parent category related entry?
I am using EE 1.6.3.
Thanks!
Jared