Results 1 to 7 of 7

Thread: All Level Menus sidebar Server Side Includes

  1. #1
    Join Date
    Feb 2009
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default All Level Menus sidebar Server Side Includes

    1) All Level Navigation Menus v2.1

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem: I'm new to this script and I've been able to get it to work on a site index page. But I need it to be used in server-side includes because there are too many pages to do individually. The menu has 3 levels and is vertical. I've done includes before and I have an apache testing server setup to parse shtml and html.
    Are there any examples or instructions that anybody can provide me with so I can get this worked out? I've been at this all day.
    Thank you.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,897
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Going by the source of the demo menu page, your goal would just be to put the HTML of the menu (everything that goes in the BODY section) in a seperate file, and then use SSI to dynamically include that page. In other words, this portion:

    Code:
    <div id="ddtopmenubar" class="mattblackmenu">
    <ul>
    <li><a href="http://www.dynamicdrive.com">Home</a></li>
    <li><a href="http://www.dynamicdrive.com/new.htm" rel="ddsubmenu1">DHTML</a></li>
    <li><a href="http://www.dynamicdrive.com/style/" rel="ddsubmenu2">CSS</a></li>
    <li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li>
    <li><a href="http://tools.dynamicdrive.com/" rel="ddsubmenu3">Web Tools</a></li>
    </ul>
    </div>
    
    <script type="text/javascript">
    ddlevelsmenu.setup("ddtopmenubar", "topbar") //ddlevelsmenu.setup("mainmenuid", "topbar|sidebar")
    </script>
    
    
    <!--HTML for the Drop Down Menus associated with Top Menu Bar-->
    <!--They should be inserted OUTSIDE any element other than the BODY tag itself-->
    <!--A good location would be the end of the page (right above "</BODY>")-->
    
    <!--Top Drop Down Menu 1 HTML-->
    
    
    <ul id="ddsubmenu1" class="ddsubmenustyle">
    <li><a href="#">Item 1a</a></li>
    <li><a href="#">Item 2a</a></li>
    
    <li><a href="#">Item Folder 3a</a>
      <ul>
      <li><a href="#">Sub Item 3.1a</a></li>
      <li><a href="#">Sub Item 3.2a</a></li>
      <li><a href="#">Sub Item 3.3a</a></li>
      <li><a href="#">Sub Item 3.4a</a></li>
      </ul>
    
    </li>
    <li><a href="#">Item 4a</a></li>
    <li><a href="#">Item Folder 5a</a>
      <ul>
      <li><a href="#">Sub Item 5.1a</a></li>
      <li><a href="#">Item Folder 5.2a</a>
        <ul>
        <li><a href="#">Sub Item 5.2.1a</a></li>
    
        <li><a href="#">Sub Item 5.2.2a</a></li>
        <li><a href="#">Sub Item 5.2.3a</a></li>
        <li><a href="#">Sub Item 5.2.4a</a></li>
        </ul>
      </li>
    	</ul>
    </li>
    <li><a href="#">Item 6a</a></li>
    
    </ul>
    
    <!--Top Drop Down Menu 2 HTML-->
    
    <ul id="ddsubmenu2" class="ddsubmenustyle">
    <li><a href="#">Item 1b</a></li>
    <li><a href="#">Item 2b</a></li>
    <li><a href="#">Item Folder 3b</a>
      <ul>
      <li><a href="#">Sub Item 3.1b</a></li>
      <li><a href="#">Sub Item 3.2b</a></li>
    
      <li><a href="#">Sub Item 3.3b</a></li>
      <li><a href="#">Sub Item 3.4b</a></li>
      </ul>
    </li>
    <li><a href="#">Item 4b</a></li>
    <li><a href="#">Item Folder 5b</a>
      <ul>
      <li><a href="#">Sub Item 5.1b</a></li>
    
      <li><a href="#">Item Folder 5.2b</a>
        <ul>
        <li><a href="#">Sub Item 5.2.1b</a></li>
        <li><a href="#">Sub Item 5.2.2b</a></li>
        <li><a href="#">Sub Item 5.2.3b</a></li>
        </ul>
      </li>
    
    	</ul>
    </li>
    <li><a href="#">Item 6b</a></li>
    </ul>
    
    <!--Top Drop Down Menu 3 HTML-->
    
    <ul id="ddsubmenu3" class="ddsubmenustyle">
    <li><a href="http://tools.dynamicdrive.com/imageoptimizer/">Image Optimizer</a></li>
    <li><a href="http://tools.dynamicdrive.com/favicon/">FavIcon Generator</a></li>
    <li><a href="http://www.dynamicdrive.com/emailriddler/">Email Riddler</a></li>
    <li><a href="http://tools.dynamicdrive.com/password/">htaccess Password</a></li>
    
    <li><a href="http://tools.dynamicdrive.com/userban/">htaccess Banning</a></li>
    </ul>
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    Rob22 (02-13-2009)

  4. #3
    Join Date
    Feb 2009
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the prompt response. I was confused with the direction to put the subs before the closing body tag.
    Anyway, using your guide, I was able to get the menu to appear, but it's either not getting the styles or not getting the arrow gif. So, what about the <head> content?

  5. #4
    Join Date
    Feb 2009
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    I just got it. I kept changing the path until it worked. thanks

  6. #5
    Join Date
    Feb 2009
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Another issue: would it work easier if I used absolute urls so when I get down into the levels it doesn't get confusing?

  7. #6
    Join Date
    Aug 2004
    Posts
    9,897
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    It depends. If the links in the drop down menus are relative links to your own pages, and the pages that will display the menu are scattered across different directories on your site, then yes, you should use absolute URLs for the links in the former.
    DD Admin

  8. The Following User Says Thank You to ddadmin For This Useful Post:

    Rob22 (02-13-2009)

  9. #7
    Join Date
    Feb 2009
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    I'm working on a site in development and needing to use includes relative to a temporary directory so it can be changed later. What I've done, with your help in pointing me in the right direction, was to change the paths in the include files to absolute; then when I need to change the root of the site, it will be easier. I also had to change the path of the arrow graphics in the js file to an absolute path so this would work for the site index and the other directories. Thank you so much for your guidance. Much appreciated!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •