6 Replies Latest reply: Apr 23, 2013 12:07 PM by Rik Ramsay RSS

    Template

    Ken Binney MVP

      Helpino a friend with templated site and ran into the code below.

      Is it odd to see a menu in an editable section?

       

      <div id="menu_panel">

      <!-- #BeginEditable "menu_section" -->

        <div id="menu_section">

          <ul>

            <li><a href="#"  class="current">Home</a></li>

            <li><a href="#">Photos</a></li>

            <li><a href="#">Products</a></li>

            <li><a href="#">Advertise</a></li>

            <li><a href="#">Links</a></li>

            <li><a href="#">Events</a></li>

            <li><a href="#">Contact</a></li>

          </ul>

        </div>

        <!-- #EndEditable -->

      </div>

        • 1. Re: Template
          Nancy O. MVP

          Yes, it is odd. Whoever built it most likely didn't know a better way to add a "current" class to site wide menus.

           

          My article (towards the bottom) discusses how to add an Editable Attribute to the Template's body tag and amend the attribute in child pages.

          http://alt-web.com/Articles/Persistent-Page-Indicator.shtml

           

           

          Nancy O.

          • 2. Re: Template
            Rik Ramsay Community Member

            Ken, if you're going to follow Nancy's suggestion to include the persistent page indicator, I would also suggest replacing that menu from the template with an include. This will allow you to easily modify the menu without updating every page of the site (if they suddenly decided to add a dropdown etc). I would also do this for the footer content and the head section.

            <div id="menu_panel">

            <!-- Begin menu include -->

                      <!--#include virtual="/includes/menu.ssi" -->

            <!-- End menu include -->

            </div>

             

            <!-- menu.ssi content -->

            <div id="menu_section">

                <ul>

                  <li><a href="#"  class="current">Home</a></li>

                  <li><a href="#">Photos</a></li>

                  <li><a href="#">Products</a></li>

                  <li><a href="#">Advertise</a></li>

                  <li><a href="#">Links</a></li>

                  <li><a href="#">Events</a></li>

                  <li><a href="#">Contact</a></li>

                </ul>

              </div>

            <!-- End menu.ssi content -->

            • 3. Re: Template
              Nancy O. MVP

              +1 Rik. 

               

               

              Nancy O.

              • 4. Re: Template
                Ken Binney MVP

                Thanks Rik -

                I LOVE SSI too, but site owner is pretty stretched... and is already committed to DWT

                • 5. Re: Template
                  Ken Binney MVP

                  Yes, I really like the body class PPI

                  • 6. Re: Template
                    Rik Ramsay Community Member

                    Ken Binney wrote:

                     

                    Thanks Rik -

                    I LOVE SSI too, but site owner is pretty stretched... and is already committed to DWT

                     

                    I'm not saying remove the template Ken, i'm saying use both template and SSI. If you are going to amend the menu and make it uneditable, you have nothing to lose by adding that content within an include. Same with the head and footer.