Build v2.4.0. I have a website that goes a few levels deep: home/projects/details/detailed_project_page.
I’d like to put a sub-menu of items in the various detailed_project_pages. The sub-menu will be different for every page. I imagine the best way would be to create a channel to feed the various sub-menus, and use an embedded template in the detailed_product_pages to display a dynamic menu. This is basic EE functionality, but I can’t get it to work. I have read the documentation for embedding templates.
Here is my details page:
{embed="embeds/html_header" my_page_title="Project Detail {exp:channel:entries channel="projects" disable="member_data|trackbacks|pagination" limit="1"} | {title}{/exp:channel:entries}"}
{embed="embeds/page_header" the_url_title="projects" my_location="projects"}
{embed="embeds/small_header" my_page_title="Projects"}
<div class="body">
<div class="left">
{embed="embeds/detail_sidenav" the_url_title="ami_details"}
{snp_sidequote}
<div class="big_center no_margin">
{exp:channel:entries channel="projects" disable="categories|member_data|pagination" sort="asc" limit="1"}
<h2>{title}</h2>
<p> {subtitle}<br />
{index_image}{page_body}<br />
{/exp:channel:entries}<br />
</div><br />
<div class="clr"></div><br />
</div><br />
</div><br />
</div>Here is my embedded template:
<div class="box no_margin">
<div class="box_t">
<div class="box_b">
<h2>Sub Navigation</h2>
<p> <ul><br />
{exp:channel:entries channel="ami_details" disable="categories|member_data|pagination" url_title="{embed:the_url_title}"}<br />
<li><a href="http://{url_title_path=%27projects/detail%27}" class="active">{title}</a></li><br />
{/exp:channel:entries}<br />
</ul><br />
</div><br />
</div><br />
</div>The channel I’m using to store data to pass into the navigation menu is called “ami_details.” Can I use the same channel to contain all information for the various submenus I want to display? Is this the best way of creating sub-navigation on pages that are already a few levels deep? If not, what would work better? What am I doing wrong, if this is the best way to handle the task?