ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Dynamic Menu list per channel entry

October 23, 2013 4:25pm

Subscribe [1]
  • #1 / Oct 23, 2013 4:25pm

    prhey404

    5 posts

    I have 5 channels with different custom fields. Each channel entry displays on its own page. On every page, there is a navigation with links to other entries from that channel only. When a new channel entry is created, a new link is generated in the navigation. But I need the navigation and the channel entry to always display on the SAME PAGE.

    Here it is working manually - http://fullcirclecreatives.com/clients/sweetmoments/cupcakes/vanilla.html

    On the left hand navigation you click an item and a new page displays, along with an “active” link style.

    I have it half working dynamically. Here is the navigation working correctly - http://sweetmomentsinc.com/index.php?/cupcakes/cupcake_test_template

    But when you click on a menu item, only the link for that entry is displayed and the rest of the links disappear. If I can get it to work like my manual website that would be awesome!

    Left navigation code:

    <ul>
    {exp:channel:entries channel="cupcakes" sort="asc" disable="member_data|pagination|categories"}
    
    <li><a href="http://{url_title_path=" title="{title}">{title}</a></li>
    
    {/exp:channel:entries}
    
    </ul>

    Channel entry display code:

    {exp:channel:entries channel="cupcakes" limit="1"}
    <div class="flavors">
    
                <h3>{title}</h3>
    <p>            {cupcake_description}</p>
    
    <p></div><br />
    {/exp:channel:entries}

  • #2 / Oct 23, 2013 8:02pm

    prhey404

    5 posts

    I figured it out, it was really simple. All I had to do was add dynamic=“no” to my dynamic navigation channel entry code, and embed the dynamic menu into the page where the entry is displayed.

    {exp:channel:entries channel="cupcakes" sort="asc" dynamic="no" disable="member_data|pagination|categories"}

    It sounds kind of ironic because I want a dynamic menu, but then I have to make the menu itself not be dynamic when I embed it in the page. Now all I have to do is figure out how to add my active css style to the navigation according to which entry is clicked.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases