8 Replies Latest reply on Aug 12, 2007 2:08 PM by mmdlcab

    displaying server-side include in DW8

    mmdlcab
      Sorry if this has been asked before? I did search and couldn't find it (this site is painfully slow and searching is worse)
      I am trying to figure out how to make DW8 show my server-side include files in the design view. My site uses SSI for all headers and footers, so every page has at least 2 SSI's. They show up as the SSI mark on the page, but not the code or graphical representation of what is in the SSI. I need to have that code snipet show up in my design view. The only way I have been able to figure out how to do it, is to reinsert the SSI again from the menu, and then delete it. Doing it that way, the original ssi that is listed on the page will display graphicly in the design view.

      I do have the option in the preferences - Invisible Elements - Server-Side includes: and the check box is checked / enabled.

      If I could, while I'm here, one other question. I have DW code rewriting turned on, and it shows me each time I open a file, what corrections it has made. But if I save the file, and then open it again, it shows me the exact same corrections being done again. Is there a trick to make DW8 save the corrections it automatically makes to the files?

      many thanks in advance.
        • 1. Re: displaying server-side include in DW8
          Level 7
          > site is painfully slow and searching is worse

          That's why many of us use NNTP access through a newsreader, and not the icky
          webforum interface.

          It sounds like you have done what you need to do to see the SSI. Hmmm....

          What server model are you using?

          > If I could, while I'm here, one other question. I have DW code rewriting
          > turned on, and it shows me each time I open a file, what corrections it
          > has
          > made. But if I save the file, and then open it again, it shows me the
          > exact
          > same corrections being done again. Is there a trick to make DW8 save the
          > corrections it automatically makes to the files?

          Your DW sounds strange. When you save the file, are the corrections there
          before you save? What kind of corrections are being made?


          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.dreamweavermx-templates.com - Template Triage!
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
          ==================


          "mmdlcab" <webforumsuser@macromedia.com> wrote in message
          news:f9n72e$b1k$1@forums.macromedia.com...
          > Sorry if this has been asked before? I did search and couldn't find it
          > (this
          > site is painfully slow and searching is worse)
          > I am trying to figure out how to make DW8 show my server-side include
          > files in
          > the design view. My site uses SSI for all headers and footers, so every
          > page
          > has at least 2 SSI's. They show up as the SSI mark on the page, but not
          > the
          > code or graphical representation of what is in the SSI. I need to have
          > that
          > code snipet show up in my design view. The only way I have been able to
          > figure
          > out how to do it, is to reinsert the SSI again from the menu, and then
          > delete
          > it. Doing it that way, the original ssi that is listed on the page will
          > display graphicly in the design view.
          >
          > I do have the option in the preferences - Invisible Elements - Server-Side
          > includes: and the check box is checked / enabled.
          >
          > If I could, while I'm here, one other question. I have DW code rewriting
          > turned on, and it shows me each time I open a file, what corrections it
          > has
          > made. But if I save the file, and then open it again, it shows me the
          > exact
          > same corrections being done again. Is there a trick to make DW8 save the
          > corrections it automatically makes to the files?
          >
          > many thanks in advance.
          >


          • 2. Re: displaying server-side include in DW8
            mmdlcab Level 1
            Thanks for the reply. I'm not sure what u mean by "What server model are you using?" Sorry if that is a stupid user comment, but that's me. The server in question is a unix server and is properly setup. In that instance, I've modified the access file so that I don't have to use the .shtml extension on the files. The files show up correctly on the server. Everything works as it should, I'm just not understanding why I don't see the (for lack of a better word) the design view of my ssi, in the design view in DW. Did you mean some sort of a server model inside DW? If yes, that may be it? I'm guessing there is a stupid-user setting that I have not enabled.

            On the DW html corrections, yes, last time I looked, the changes it says it was making, are there when I preview the code. But the next time I open the file after saving, it seems to flag the same corrections again. I can literally, open a file, DW points out the corrections it's making, save the file, and then open it again, and it will flag the same stuff over again. The corrections themselves are nothing all that tricky. Things like closing table tags, paragraph tags, etc. I have to admit to doing most of my design in the design view. I don't work in the code view unless I really have to.

            Does that answer your questions?
            thanks!
            • 3. Re: displaying server-side include in DW8
              Level 7
              Are you using a server scripting language (ASP/PHP/etc.)?

              Is the parent page named with an *.shtm(l) extension?

              > In that instance, I've
              > modified the access file so that I don't have to use the .shtml extension
              > on
              > the files.

              Oh - I see. I'm afraid DW will be flummoxed by this. Try renaming your
              local file with that extension and see if the includes appear?

              > I don't work in the code view unless I really have to.

              This is a real mistake. If you want to work effectively with DW, you will
              have to begin becoming familiar with code view. If the mistakes are
              corrected by DW when you LOOK IN CODE VIEW, and you then save the file, then
              the corrections will be there when you next open the file.

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.dreamweavermx-templates.com - Template Triage!
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
              ==================


              "mmdlcab" <webforumsuser@macromedia.com> wrote in message
              news:f9nbfv$fh8$1@forums.macromedia.com...
              > Thanks for the reply. I'm not sure what u mean by "What server model are
              > you
              > using?" Sorry if that is a stupid user comment, but that's me. The
              > server in
              > question is a unix server and is properly setup. In that instance, I've
              > modified the access file so that I don't have to use the .shtml extension
              > on
              > the files. The files show up correctly on the server. Everything works
              > as it
              > should, I'm just not understanding why I don't see the (for lack of a
              > better
              > word) the design view of my ssi, in the design view in DW. Did you mean
              > some
              > sort of a server model inside DW? If yes, that may be it? I'm guessing
              > there
              > is a stupid-user setting that I have not enabled.
              >
              > On the DW html corrections, yes, last time I looked, the changes it says
              > it
              > was making, are there when I preview the code. But the next time I open
              > the
              > file after saving, it seems to flag the same corrections again. I can
              > literally, open a file, DW points out the corrections it's making, save
              > the
              > file, and then open it again, and it will flag the same stuff over again.
              > The
              > corrections themselves are nothing all that tricky. Things like closing
              > table
              > tags, paragraph tags, etc. I have to admit to doing most of my design in
              > the
              > design view. I don't work in the code view unless I really have to.
              >
              > Does that answer your questions?
              > thanks!
              >


              • 4. Re: displaying server-side include in DW8
                mmdlcab Level 1
                Many thanks for the help Murray I really appreciate your assistance

                -->Are you using a server scripting language (ASP/PHP/etc.)?

                No, no scripting stuff at all. Just the SSI.

                -->Is the parent page named with an *.shtm(l) extension?
                -->> In that instance, I've
                -->> modified the access file so that I don't have to use the .shtml extension
                -->> on
                -->> the files.
                -->Oh - I see. I'm afraid DW will be flummoxed by this. Try renaming your
                -->local file with that extension and see if the includes appear?

                I did try renaming the file to something like filename.shtml
                and no change. It still does not show me the contents of the SSI inside the design view. Like I said above, I'd bet the answer to my question is that there is some user setting, or file, or preference in DW that I just have not found or set yet. It's not a huge thing, but sure would be nice to see the contents of those SSI's (headers and footers) when I am doing the page design. If it matters or helps any, these 2 include files are each just a small 1 row 3 column table with different items in each cell of the table. It's just simple stuff, but saves me from having to do it on each page, and can be changed globally on the site by just changing the header or footer include file as needed. Yea, I know CSS is prob. my best answer for that kind of stuff and I will move to that by the end of the year once I understand it better.

                -->This is a real mistake. If you want to work effectively with DW, you will
                -->have to begin becoming familiar with code view.

                You are 100% correct there of course, and I am learning as I go. I do use the code view, and can normally fix my simple error problems in the code view when something goes wrong. The site I am working on is really pretty simple from a code standpoint. I'm trying to learn the more complex things as I go. All things in time.

                Thanks again
                Craig



                • 5. Re: displaying server-side include in DW8
                  bregent Most Valuable Participant
                  Do any of your included files include html, head or body tags? If so, that's the problem. Having those creates invalid html which DW will not render.
                  • 6. Re: displaying server-side include in DW8
                    mmdlcab Level 1
                    quote:

                    Originally posted by: bregent
                    Do any of your included files include html, head or body tags? If so, that's the problem. Having those creates invalid html which DW will not render.


                    Thats a great thought, but I just checked, and no, none of those tags are in the files. I'll see if I can attach the code for the 2 files and see if that helps any. The header file does have my menu system pasted into the text of the include file, but that has not caused problems previously. FWIW, this worked fine in DW4 which is what I upgraded from. In version 4, the headers and footers showed up fine in desgin view. I know that there were major changes between 4 and 8.

                    Header include file:
                    ----------------------------
                    <table border="0" align="center" width="750" height="110">
                    <tr>
                    <td><a href="/index2.html"><img src="/images/color_logo.gif" width="110" height="107" alt="MMDL Logo" border="0" /></a></td>
                    <td align="center" valign="middle"><a href="/index2.html"><img src="/images/header4.gif" width="450" height="110" border="0" alt="MMDL - The worlds largest steel tip dart league" /></a></td>
                    <td align="center" valign="middle"><a href="testpage.html"></a><a href=" http://www.dmisports.com/darts_main.html"><img src="/images/dmilogo_small.gif" alt="DMI Sports" width="110" height="77" border="0" longdesc=" http://www.dmisports.com" /><br />
                    <!-- <a href=" http://www.mmdl.org/dmi_flyer.pdf" target="_blank">League Board </a></td>-->
                    </a><a href=" http://www.mmdl.org/dmi_flyer.pdf">League Board </a></td>
                    </tr>
                    </table>
                    <!-- DHTML Menu Builder Loader Code START --><script language="JavaScript" type="text/javascript">
                    var navVer = navigator.appVersion;
                    if(navVer.substr(0,3) >= 4)
                    if((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4)) {
                    document.write('<' + 'script language="JavaScript" type="text/javascript" src=" http://www.mmdl.org/dmbmenu/nsmenu.js"><\/script\>');
                    } else {
                    document.write('<' + 'script language="JavaScript" type="text/javascript" src=" http://www.mmdl.org/dmbmenu/iemenu.js"><\/script\>');
                    }</script>
                    <!-- DHTML Menu Builder Loader Code END --><table border="0" width="550" height="110">
                    -------------------------------------
                    footer include file
                    --------------------
                    <table border="0" align="center">
                    <tr>
                    <td width="20" valign="top" align="center"> </td>
                    <td align="center" valign="middle" width="194">
                    <div align="left"><a href="mailto:cab@mmdl.org?subject=MMDL Darts.*.. ">Comments? Email us</a></div>
                    </td>
                    <td align="center" valign="middle" width="128"><a href=" http://www.mmdl.org/dmbmenu/textmenu.html">Text
                    based menu</a></td>
                    <td align="center" valign="middle" width="223">&copy; <SUP>SM</SUP> 2007 Minute Man Dart League. All rights reserved.</td>
                    </tr>
                    </table>
                    -----------------------


                    • 7. Re: displaying server-side include in DW8
                      Level 7
                      > I know that there were major changes between 4 and 8.

                      One of which was tightening the tolerance for bad code. CS3 is very strict
                      about displaying proper code.

                      However, your fragments below look OK.


                      --
                      Murray --- ICQ 71997575
                      Adobe Community Expert
                      (If you *MUST* email me, don't LAUGH when you do so!)
                      ==================
                      http://www.dreamweavermx-templates.com - Template Triage!
                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                      ==================


                      "mmdlcab" <webforumsuser@macromedia.com> wrote in message
                      news:f9njc8$np1$1@forums.macromedia.com...
                      >
                      quote:

                      Originally posted by: bregent
                      > Do any of your included files include html, head or body tags? If so,
                      > that's
                      > the problem. Having those creates invalid html which DW will not
                      > render.

                      >
                      > Thats a great thought, but I just checked, and no, none of those tags are
                      > in
                      > the files. I'll see if I can attach the code for the 2 files and see if
                      > that
                      > helps any. The header file does have my menu system pasted into the text
                      > of
                      > the include file, but that has not caused problems previously. FWIW, this
                      > worked fine in DW4 which is what I upgraded from. In version 4, the
                      > headers
                      > and footers showed up fine in desgin view. I know that there were major
                      > changes between 4 and 8.
                      >
                      > Header include file:
                      > ----------------------------
                      > <table border="0" align="center" width="750" height="110">
                      > <tr>
                      > <td><a href="/index2.html"><img src="/images/color_logo.gif"
                      > width="110"
                      > height="107" alt="MMDL Logo" border="0" /></a></td>
                      > <td align="center" valign="middle"><a href="/index2.html"><img
                      > src="/images/header4.gif" width="450" height="110" border="0" alt="MMDL -
                      > The
                      > worlds largest steel tip dart league" /></a></td>
                      > <td align="center" valign="middle"><a href="testpage.html"></a><a
                      > href=" http://www.dmisports.com/darts_main.html"><img
                      > src="/images/dmilogo_small.gif" alt="DMI Sports" width="110" height="77"
                      > border="0" longdesc=" http://www.dmisports.com" /><br />
                      > <!-- <a href=" http://www.mmdl.org/dmi_flyer.pdf"
                      > target="_blank">League Board </a></td>-->
                      > </a><a href=" http://www.mmdl.org/dmi_flyer.pdf">League Board </a></td>
                      > </tr>
                      > </table>
                      > <!-- DHTML Menu Builder Loader Code START --><script language="JavaScript"
                      > type="text/javascript">
                      > var navVer = navigator.appVersion;
                      > if(navVer.substr(0,3) >= 4)
                      > if((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4))
                      > {
                      > document.write('<' + 'script language="JavaScript" type="text/javascript"
                      > src=" http://www.mmdl.org/dmbmenu/nsmenu.js"><\/script\>');
                      > } else {
                      > document.write('<' + 'script language="JavaScript" type="text/javascript"
                      > src=" http://www.mmdl.org/dmbmenu/iemenu.js"><\/script\>');
                      > }</script>
                      > <!-- DHTML Menu Builder Loader Code END --><table border="0" width="550"
                      > height="110">
                      > -------------------------------------
                      > footer include file
                      > --------------------
                      > <table border="0" align="center">
                      > <tr>
                      > <td width="20" valign="top" align="center"> </td>
                      > <td align="center" valign="middle" width="194">
                      > <div align="left"><a href="mailto:cab@mmdl.org?subject=MMDL
                      > Darts.*..
                      > ">Comments? Email us</a></div>
                      > </td>
                      > <td align="center" valign="middle" width="128"><a
                      > href=" http://www.mmdl.org/dmbmenu/textmenu.html">Text
                      > based menu</a></td>
                      > <td align="center" valign="middle" width="223">&copy; <SUP>SM</SUP>
                      > 2007
                      > Minute Man Dart League. All rights reserved.</td>
                      > </tr>
                      > </table>
                      > -----------------------
                      >
                      >
                      >
                      >


                      • 8. Re: displaying server-side include in DW8
                        mmdlcab Level 1
                        quote:

                        Originally posted by: Newsgroup User
                        > I know that there were major changes between 4 and 8.

                        One of which was tightening the tolerance for bad code. CS3 is very strict
                        about displaying proper code.

                        However, your fragments below look OK.



                        yup, thanks. and this is DW8. I have not upgraded to CS3 yet. Just my luck, I had just done the upgrade to 8 not long before cs3 came out. What ever the freebie upgrade time frame was, I was about a couple weeks outside of that window. I checked. figures, thats the way my luck runs.
                        thx