Hello,
The short version:
Can you place an exp:query inside a weblog:entries tag?
Here’s what I’m trying to do.
I have two templates; menu and page. The menu embeds in the page template. In past weblogs everything has worked great in that the correct menu entries that are related to the main content on the page template appear.
However, for my new weblog I’m using categories AND subcategories. The catch?
Auto-Assign Category Parents is set to Yes.
So because I’m using subcategories, I think I need to use a query so that on subcategory pages, the subcategory and NOT the category menu appears.
Below is code I’ve used in the past that works great for working with only parent categories:
{if segment_2 == 'entry'}
{exp:weblog:entries weblog="eeos"}
{categories}{if category_id == '486'}{/categories}
<ul>
{embed="eeos/menu_embed" catg="486"}
</ul>
{categories}{if:elseif category_id == '487'}{/categories}
<ul>
<li> <a href="http://{path=">Undergraduate Program</a></li>
{embed="eeos/menu_embed" catg="487"}
</ul>I didn’t paste all the code.
However, now I have entries that are listed twice in the category_posts table, with for example entry id 2203 is listed with cat_id 486 and 490 (this being the subcategory).
Can i, with Auto-Assign Category Parents is set to Yes, use code similar to the code above, to list entries in only the subcategory?
Thanks!