1

I have a channel called stories and a menu.html that includes the stories by looping through all the entries and adding all those that have a "yes" add to menu.

It works on the main index.html template list for the channel (via embed). However in single.html (the displays only one entry) the embedded menu.html only displays the menu link associated with the entry shown - it needs to show all the stories. How do I do this?

Code for menu.html

          {exp:channel:entries 
            channel='stories' 
            orderby='stories_item_date' 
            sort="desc" }

              <?php 
                  $list_menu = 'Yes';
                  if ($list_menu == '{testimony_menu}') {

                    $current_page = '{testimony_no}';
                    $menuID = '{testimony_menu_id}';
                    if ($current_page == $menuID)
                    {
                      echo "<section class='section active'>";
                    }
                    else { 
                      echo "<section class='section'>";
                    }
              ?>
                  <p class="title"><a href="{url_title_path="stories/single"}" title="{testimony_chapter_title}">{testimony_chapter_title}</a></p>
                  </section>
            <?php } ?>

          {/exp:channel:entries}
2

Try adding dynamic="no" to your channel:entries loop

| improve this answer | |
  • That did the job – Dan Lee Jul 10 '14 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.