So, I made my nav with categories, so my code looks like this:
<div class="menu_nav">
<ul>
<li><a href="http://{site_link}"><span>Home</span></a></li>
{exp:channel:categories style="linear"}
<li><a href="http://{site_link}{category_url_title}"><span>{category_name}</span></a></li>
{/exp:channel:categories}
</ul>
</div>Now I want to create a sub menu on another section of the site based on what category that specific page is on. So I used this code:
<h2 class="star">Sub Menu</h2><div class="clr"></div>
<ul class="sb_menu">
{exp:channel:categories style="linear"}
{exp:channel:entries channel="main" category="{category_id}" orderby="date" sort="asc"}
<li><a href="http://{site_link}{url_title}">{title}</a></li>
{/exp:channel:entries}
{/exp:channel:categories}
</ul>but it doesn’t work does anyone have any other idea on how to approach this?
Thanks.