12 Replies Latest reply on Jul 21, 2007 8:13 PM by Newsgroup_User

    Including a CSS menu on multiple pages

    Level 7
      I have developed a site at: www.mcjtraining.co.uk/. As this site
      originated in FrontPage 2003 and was imported into DW MX 2004 there must
      be many shortcoming for which I make no excuse. I am learning.

      I have used the PVII menu CSS tutorial to make a horizontal drop down
      menu. And I wonder if I have made an unwise choice.

      The menu is in multiple pages and the site is still being developed.
      However I want to include the menu in such a way as to only have to edit
      one file which will then be updated in all the pages where it appears.

      I have read the Help file on server-side includes and library items. I
      have read the threads in the last 30 days in this NG on these topics and
      I have searched on-line and in the two books on DW that have. Nothing I
      have read so far encourages me to use server-side includes or a library
      item. Both these methods seem to have drawbacks for a five-eighths like me.

      I would very much appreciate any recommendations on how to achieve my aim.

      Malcolm Walker
        • 1. Re: Including a CSS menu on multiple pages
          Level 7
          Server Side includes are a perfect way to handle site-wide menus. What
          exactly is discouraging you from using them?


          --

          E. Michael Brandt

          www.divaHTML.com
          divaGPS | divaFAQ

          www.valleywebdesigns.com
          JustSo PictureWindow

          --

          Malcolm Walker wrote:
          > I have developed a site at: www.mcjtraining.co.uk/. As this site
          > originated in FrontPage 2003 and was imported into DW MX 2004 there must
          > be many shortcoming for which I make no excuse. I am learning.
          >
          > I have used the PVII menu CSS tutorial to make a horizontal drop down
          > menu. And I wonder if I have made an unwise choice.
          >
          > The menu is in multiple pages and the site is still being developed.
          > However I want to include the menu in such a way as to only have to edit
          > one file which will then be updated in all the pages where it appears.
          >
          > I have read the Help file on server-side includes and library items. I
          > have read the threads in the last 30 days in this NG on these topics and
          > I have searched on-line and in the two books on DW that have. Nothing I
          > have read so far encourages me to use server-side includes or a library
          > item. Both these methods seem to have drawbacks for a five-eighths like
          > me.
          >
          > I would very much appreciate any recommendations on how to achieve my aim.
          >
          > Malcolm Walker

          • 2. Re: Including a CSS menu on multiple pages
            Level 7
            On Sun, 22 Jul 2007 00:06:23 +0100, Malcolm Walker
            <mewalker@uwclub.net> wrote:

            >I have developed a site at: www.mcjtraining.co.uk/. As this site
            >originated in FrontPage 2003 and was imported into DW MX 2004 there must
            >be many shortcoming for which I make no excuse. I am learning.
            >
            >I have used the PVII menu CSS tutorial to make a horizontal drop down
            >menu. And I wonder if I have made an unwise choice.
            >
            >The menu is in multiple pages and the site is still being developed.
            >However I want to include the menu in such a way as to only have to edit
            >one file which will then be updated in all the pages where it appears.
            >
            >I have read the Help file on server-side includes and library items. I
            >have read the threads in the last 30 days in this NG on these topics and
            >I have searched on-line and in the two books on DW that have. Nothing I
            >have read so far encourages me to use server-side includes or a library
            >item. Both these methods seem to have drawbacks for a five-eighths like me.
            >
            >I would very much appreciate any recommendations on how to achieve my aim.
            >
            >Malcolm Walker


            I think using server sides are by far the best way - and no problems.

            But if the site won't have too many pages - just us a DW template and
            put the top banner and navigation in the template - and if you change
            it - it will update every child page.

            Still think ss is the best way though. I resisted using them for some
            time, but now I find it so much easier to maintain the sites.

            --

            ~Malcolm N....
            ~
            • 3. Re: Including a CSS menu on multiple pages
              Level 7
              Thank you for your response. I am encouraged already!

              But what does the server-side include file comprise? The menu is in a
              div - does the file need to be just the div and its contents or does it
              need to be a web page HTML file with a DocType, head and body? This
              isn't made clear from the Help file. Also in Help the insert
              instructions read:
              Insert | Script Objects | Server-Side Include

              whereas in my copy of DW the route is:
              Insert | HTML | Script Objects | Server-Side Include

              I just need to be assured I am going about this in a correct manner.

              Malcolm

              E Michael Brandt wrote:
              > Server Side includes are a perfect way to handle site-wide menus. What
              > exactly is discouraging you from using them?
              • 4. Re: Including a CSS menu on multiple pages
                Level 7
                Malcolm thank you for your advice. It is very much appreciated.

                Malcolm Walker

                Malcolm N_ wrote:
                > I think using server sides are by far the best way - and no problems.
                >
                > But if the site won't have too many pages - just use a DW template and
                > put the top banner and navigation in the template - and if you change
                > it - it will update every child page.
                >
                > Still think ss is the best way though. I resisted using them for some
                > time, but now I find it so much easier to maintain the sites.
                >
                • 5. Re: Including a CSS menu on multiple pages
                  Level 7
                  "Malcolm Walker" <mewalker@uwclub.net> wrote in message
                  news:f7u7mb$gkr$1@forums.macromedia.com...
                  > Thank you for your response. I am encouraged already!
                  >
                  > But what does the server-side include file comprise? The menu is in a
                  > div - does the file need to be just the div and its contents or does it
                  > need to be a web page HTML file with a DocType, head and body? This isn't
                  > made clear from the Help file. Also in Help the insert instructions read:
                  > Insert | Script Objects | Server-Side Include

                  Hi Malcolm,

                  Even though you are using our free menu, this tutorial from the user guide
                  for our commercial menu should help you understand a bit more:
                  http://www.projectseven.com/products/menusystems/pmm/user_guide/site_wide/includes/index.h tm


                  --
                  Al Sparber - PVII
                  http://www.projectseven.com
                  Extending Dreamweaver - Nav Systems | Galleries | Widgets
                  Authors: "42nd Street: Mastering the Art of CSS Design"


                  • 6. Re: Including a CSS menu on multiple pages
                    Level 7
                    If you need further help, feel free to ask again. <plug begins> I'd
                    like to suggest an Extension if I might. Once you add your menu and get
                    it working, take a look at divaGPS. It will automatically add
                    you-are-here highlighting to your site's menus. No extra classes or
                    special coding is needed within the menu at all. It is an elegant and
                    simple way to add this functionality that can save you tons of time and
                    effort. Check it out at

                    http://www.divahtml.com/products/divaGPS/current_menu_location.php

                    Thanks for letting me tell you about it.</end of plug>

                    --

                    E. Michael Brandt

                    www.divaHTML.com
                    divaGPS | divaFAQ

                    www.valleywebdesigns.com
                    JustSo PictureWindow

                    --

                    Malcolm Walker wrote:
                    > Thank you for your response. I am encouraged already!
                    >
                    > But what does the server-side include file comprise? The menu is in a
                    > div - does the file need to be just the div and its contents or does it
                    > need to be a web page HTML file with a DocType, head and body? This
                    > isn't made clear from the Help file. Also in Help the insert
                    > instructions read:
                    > Insert | Script Objects | Server-Side Include
                    >
                    > whereas in my copy of DW the route is:
                    > Insert | HTML | Script Objects | Server-Side Include
                    >
                    > I just need to be assured I am going about this in a correct manner.
                    >
                    > Malcolm
                    >
                    > E Michael Brandt wrote:
                    >> Server Side includes are a perfect way to handle site-wide menus.
                    >> What exactly is discouraging you from using them?
                    • 7. Re: Including a CSS menu on multiple pages
                      Level 7
                      Not only thank you for the tutorial but also for so generously providing
                      the link to your pop menu magic includes user guide. From a brief
                      initial visit I can see that includes are dealt with most
                      comprehensively. Thank you again.

                      Malcolm

                      Al Sparber- PVII wrote:
                      >
                      > Hi Malcolm,
                      >
                      > Even though you are using our free menu, this tutorial from the user
                      > guide for our commercial menu should help you understand a bit more:
                      > http://www.projectseven.com/products/menusystems/pmm/user_guide/site_wide/includes/index.h tm
                      • 8. Re: Including a CSS menu on multiple pages
                        Level 7
                        "E Michael Brandt" <michael@valleywebdesigns.com> wrote in message
                        news:f7u8sf$gd5$2@forums.macromedia.com...
                        > If you need further help, feel free to ask again. <plug begins> I'd like
                        > to suggest an Extension if I might. Once you add your menu and get it
                        > working, take a look at divaGPS. It will automatically add you-are-here
                        > highlighting to your site's menus. No extra classes or special coding is
                        > needed within the menu at all. It is an elegant and simple way to add
                        > this functionality that can save you tons of time and effort. Check it out
                        > at
                        >
                        > http://www.divahtml.com/products/divaGPS/current_menu_location.php
                        >
                        > Thanks for letting me tell you about it.</end of plug>

                        It looks like a very nice tool. If Malcolm is looking for a free solution to
                        go with his free menu, our wee uberlinks script was updated last year from
                        its original 2003 version and might be an alternative solution.

                        The script (place in an external file)

                        function P7_Uberlink(cl,d){
                        var i,ob,tA,h=document.location.href;
                        if(document.getElementById){
                        ob=(d)?document.getElementById(d):document;
                        if(ob){
                        tA=ob.getElementsByTagName('A');
                        for(i=0;i<tA.length;i++){
                        if(tA .href==h){
                        tA
                        .className=cl;
                        }}}}}

                        ID the body tag, for example:
                        <body id="p7bod">

                        Write a class in an external style sheet:
                        .p7uberlink {
                        font-weight: bold;
                        }

                        Drop an initializer before the closing body tag (or run an load function
                        from inside the external js file):
                        <script type="text/javascript">
                        <!--
                        P7_Uberlink('p7uberlink','p7bod');
                        //-->
                        </script>

                        In a site managed with includes, it's a great solution. I do like yours,
                        too - especially for folks retrofitting existing pages - especially when
                        working with DWTs.


                        --
                        Al Sparber - PVII
                        http://www.projectseven.com
                        Extending Dreamweaver - Nav Systems | Galleries | Widgets
                        Authors: "42nd Street: Mastering the Art of CSS Design"




                        • 9. Re: Including a CSS menu on multiple pages
                          Level 7
                          "Malcolm Walker" <mewalker@uwclub.net> wrote in message
                          news:f7u9sr$ivn$1@forums.macromedia.com...
                          > Not only thank you for the tutorial but also for so generously providing
                          > the link to your pop menu magic includes user guide. From a brief initial
                          > visit I can see that includes are dealt with most comprehensively. Thank
                          > you again.

                          You're very welcome.

                          • 10. Re: Including a CSS menu on multiple pages
                            Level 7
                            Thanks Al. divaGPS also has a very comprehensive set of url matching
                            criteria, so it seems to work in all the situations we could think to
                            throw at it. It also works seamlessly with other scripts that might be
                            on the page or added later, and has very broad applicability for both
                            old and new pages.

                            emichael brandt


                            Al Sparber- PVII wrote:

                            > "E Michael Brandt" <michael@valleywebdesigns.com> wrote in message
                            > news:f7u8sf$gd5$2@forums.macromedia.com...
                            >> If you need further help, feel free to ask again. <plug begins> I'd
                            >> like to suggest an Extension if I might. Once you add your menu and
                            >> get it working, take a look at divaGPS. It will automatically add
                            >> you-are-here highlighting to your site's menus. No extra classes or
                            >> special coding is needed within the menu at all. It is an elegant and>> simple way to add this functionality that can save you tons of time
                            >> and effort. Check it out at
                            >>
                            >> http://www.divahtml.com/products/divaGPS/current_menu_location.php
                            >>
                            >> Thanks for letting me tell you about it.</end of plug>
                            >
                            > It looks like a very nice tool. If Malcolm is looking for a free
                            > solution to go with his free menu, our wee uberlinks script was updated
                            > last year from its original 2003 version and might be an alternative
                            > solution.
                            >
                            > The script (place in an external file)
                            >
                            > function P7_Uberlink(cl,d){
                            > var i,ob,tA,h=document.location.href;
                            > if(document.getElementById){
                            > ob=(d)?document.getElementById(d):document;
                            > if(ob){
                            > tA=ob.getElementsByTagName('A');
                            > for(i=0;i<tA.length;i++){
                            > if(tA .href==h){
                            > tA
                            .className=cl;
                            > }}}}}
                            >
                            > ID the body tag, for example:
                            > <body id="p7bod">
                            >
                            > Write a class in an external style sheet:
                            > .p7uberlink {
                            > font-weight: bold;
                            > }
                            >
                            > Drop an initializer before the closing body tag (or run an load function
                            > from inside the external js file):
                            > <script type="text/javascript">
                            > <!--
                            > P7_Uberlink('p7uberlink','p7bod');
                            > //-->
                            > </script>
                            >
                            > In a site managed with includes, it's a great solution. I do like yours,
                            > too - especially for folks retrofitting existing pages - especially when
                            > working with DWTs.
                            >
                            >


                            --

                            E. Michael Brandt

                            www.divaHTML.com
                            divaGPS | divaFAQ

                            www.valleywebdesigns.com
                            JustSo PictureWindow

                            --
                            • 11. Re: Including a CSS menu on multiple pages
                              Level 7
                              It looks good. We've been packing what we call Advanced Current Marking"
                              utilities in our commercial menu products and once thought about doing an
                              even more advanced general version applicable to pages that do not contain
                              our menu products. GPS seems to fill that niche. I'll have to buy a copy and
                              take it for a spin :-)

                              Good luck with it.

                              --
                              Al




                              "E Michael Brandt" <michael@valleywebdesigns.com> wrote in message
                              news:f7ucp5$gd5$6@forums.macromedia.com...
                              > Thanks Al. divaGPS also has a very comprehensive set of url matching
                              > criteria, so it seems to work in all the situations we could think to
                              > throw at it. It also works seamlessly with other scripts that might be on
                              > the page or added later, and has very broad applicability for both old and
                              > new pages.
                              >
                              > emichael brandt
                              >
                              >
                              > Al Sparber- PVII wrote:
                              >
                              >> "E Michael Brandt" <michael@valleywebdesigns.com> wrote in message
                              >> news:f7u8sf$gd5$2@forums.macromedia.com...
                              >>> If you need further help, feel free to ask again. <plug begins> I'd
                              >>> like to suggest an Extension if I might. Once you add your menu and get
                              >>> it working, take a look at divaGPS. It will automatically add
                              >>> you-are-here highlighting to your site's menus. No extra classes or
                              >>> special coding is needed within the menu at all. It is an elegant and>>
                              >>> simple way to add this functionality that can save you tons of time and
                              >>> effort. Check it out at
                              >>>
                              >>> http://www.divahtml.com/products/divaGPS/current_menu_location.php
                              >>>
                              >>> Thanks for letting me tell you about it.</end of plug>
                              >>
                              >> It looks like a very nice tool. If Malcolm is looking for a free solution
                              >> to go with his free menu, our wee uberlinks script was updated last year
                              >> from its original 2003 version and might be an alternative solution.
                              >>
                              >> The script (place in an external file)
                              >>
                              >> function P7_Uberlink(cl,d){
                              >> var i,ob,tA,h=document.location.href;
                              >> if(document.getElementById){
                              >> ob=(d)?document.getElementById(d):document;
                              >> if(ob){
                              >> tA=ob.getElementsByTagName('A');
                              >> for(i=0;i<tA.length;i++){
                              >> if(tA .href==h){
                              >> tA
                              .className=cl;
                              >> }}}}}
                              >>
                              >> ID the body tag, for example:
                              >> <body id="p7bod">
                              >>
                              >> Write a class in an external style sheet:
                              >> .p7uberlink {
                              >> font-weight: bold;
                              >> }
                              >>
                              >> Drop an initializer before the closing body tag (or run an load function
                              >> from inside the external js file):
                              >> <script type="text/javascript">
                              >> <!--
                              >> P7_Uberlink('p7uberlink','p7bod');
                              >> //-->
                              >> </script>
                              >>
                              >> In a site managed with includes, it's a great solution. I do like yours,
                              >> too - especially for folks retrofitting existing pages - especially when
                              >> working with DWTs.
                              >>
                              >>
                              >
                              >
                              > --
                              >
                              > E. Michael Brandt
                              >
                              > www.divaHTML.com
                              > divaGPS | divaFAQ
                              >
                              > www.valleywebdesigns.com
                              > JustSo PictureWindow
                              >
                              > --

                              • 12. Re: Including a CSS menu on multiple pages
                                Level 7
                                Thanks Al.

                                --

                                E. Michael Brandt

                                www.divaHTML.com
                                divaGPS | divaFAQ

                                www.valleywebdesigns.com
                                JustSo PictureWindow

                                --

                                Al Sparber- PVII wrote:
                                > It looks good. We've been packing what we call Advanced Current Marking"
                                > utilities in our commercial menu products and once thought about doing
                                > an even more advanced general version applicable to pages that do not
                                > contain our menu products. GPS seems to fill that niche. I'll have to
                                > buy a copy and take it for a spin :-)
                                >
                                > Good luck with it.
                                >