6 Replies Latest reply on Nov 20, 2008 3:28 PM by Newsgroup_User

    question about php pages

    WyndWoman
      I'm using Dreamweaver 8 and Windows XP.

      My goal is to get away from using templates.

      I started with an html document, using CSS layout.
      I then went and learned about serverside includes (php) for my navigation and footer. (Who knew it was so easy?)

      At the same time I learned that the page holding the SSI cannot be html, so I did a "save as" to php. As soon as I did that, Dreamweaver no longer displayed the CSS layout - none of the divs show, and none of the content shows in Dreamweaver EXCEPT for the text of the menu, which is in the SSI. When I upload the file, it displays in IE and Firefox just fine - http://nned.uua.org/test.php. The CSS is at nned.uua.org/nned.css

      What do I need to do to be able to edit in design view in Dreamweaver? Or am I doomed to having to edit in code view?
        • 1. Re: question about php pages
          Level 7
          If you're not using any PHP code in your pages save them as .shtml instead
          of PHP.

          --

          Walt


          "WyndWoman" <webforumsuser@macromedia.com> wrote in message
          news:gg2k5o$n2a$1@forums.macromedia.com...
          > I'm using Dreamweaver 8 and Windows XP.
          >
          > My goal is to get away from using templates.
          >
          > I started with an html document, using CSS layout.
          > I then went and learned about serverside includes (php) for my navigation
          > and
          > footer. (Who knew it was so easy?)
          >
          > At the same time I learned that the page holding the SSI cannot be html,
          > so I
          > did a "save as" to php. As soon as I did that, Dreamweaver no longer
          > displayed
          > the CSS layout - none of the divs show, and none of the content shows in
          > Dreamweaver EXCEPT for the text of the menu, which is in the SSI. When I
          > upload the file, it displays in IE and Firefox just fine -
          > http://nned.uua.org/test.php. The CSS is at nned.uua.org/nned.css
          >
          > What do I need to do to be able to edit in design view in Dreamweaver? Or
          > am I
          > doomed to having to edit in code view?
          >


          • 2. Re: question about php pages
            Level 7
            It doesn't matter. Really.

            >> At the same time I learned that the page holding the SSI cannot be html,
            >> so I

            Of course the page can be html, but it cannot have a FILE EXTENSION of just
            "html", e.g., 'foo.html'. For server-side includes to work, the server has
            to be told that it needs to parse the file being fetched to look for the
            include directives. An extension of *.html will not trigger that parsing
            (usually).

            With regard to your Dreamweaver problem, it is caused by an outrageously
            damaged file. The page to which you have linked has the following markup -

            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">

            (ahem - two doctypes at not twice as good as one)

            <html>

            <link rel="stylesheet" type="text/css" href="nned.css">
            <title>Northern New England District - Unitarian Universalist
            Association</title>

            <div id="container">

            (note - there is no <body> tag)

            <div id="banner">
            <img src="images/bannerdraft2.jpg" width="1000" height="215"></h1>
            </div>
            <div id="nav1">

            <ul>
            <li class="first style1">Contact Us:    <a
            href="#">Directory</a></li>
            <li><a href="#">District Office</a></li>
            </ul>
            </div>

            <div class="menu">
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

            (note - a third doctype!)

            It goes on. It appears that you have included several complete,
            stand-alone HTML pages within your parent page. That's wrong.

            When you use server-side includes, there are at least two files involved:

            1. The parent file
            2. The include file

            The parent file (the one RECEIVING the included file's code) must be named
            with a file extension that triggers a server parse to find the include
            directives (e.g., *.shtm(l), *.asp, *.php, etc.). Of course, the extension
            would have to match the server models supported by a) your site definition,
            and b) the hosting server. The include file (the code fragment file) may be
            named with any extension you desire (we joke here about naming them with the
            'monkeybutt' extension, since that extension name is irrelevant to the
            function of the file itself). HOWEVER, if the include file is named with an
            extension that DW doesn't recognize, then you will not get a Design view
            option when the file is opened.

            For this reason, it's best to just name your include files with the *.htm(l)
            extension. Alternatively, if you *really* like '*.monkeybutt', you can add
            this extension to the list of file extensions that DW recognizes -

            http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410&sliceId=1

            The DW problem is the result of your confusing page markup - DW has no idea
            how to render the page.

            --
            Murray --- ICQ 71997575
            Adobe Community Expert
            (If you *MUST* email me, don't LAUGH when you do so!)
            ==================
            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
            ==================


            "Walt F. Schaefer" <walt@waltswebworx.com> wrote in message
            news:gg2r95$1r0$1@forums.macromedia.com...
            > If you're not using any PHP code in your pages save them as .shtml instead
            > of PHP.
            >
            > --
            >
            > Walt
            >
            >
            > "WyndWoman" <webforumsuser@macromedia.com> wrote in message
            > news:gg2k5o$n2a$1@forums.macromedia.com...
            >> I'm using Dreamweaver 8 and Windows XP.
            >>
            >> My goal is to get away from using templates.
            >>
            >> I started with an html document, using CSS layout.
            >> I then went and learned about serverside includes (php) for my navigation
            >> and
            >> footer. (Who knew it was so easy?)
            >>
            >> At the same time I learned that the page holding the SSI cannot be html,
            >> so I
            >> did a "save as" to php. As soon as I did that, Dreamweaver no longer
            >> displayed
            >> the CSS layout - none of the divs show, and none of the content shows in
            >> Dreamweaver EXCEPT for the text of the menu, which is in the SSI. When I
            >> upload the file, it displays in IE and Firefox just fine -
            >> http://nned.uua.org/test.php. The CSS is at nned.uua.org/nned.css
            >>
            >> What do I need to do to be able to edit in design view in Dreamweaver? Or
            >> am I
            >> doomed to having to edit in code view?
            >>
            >
            >

            • 3. Re: question about php pages
              Level 7
              On Thu, 20 Nov 2008 03:05:28 +0000 (UTC), "WyndWoman"
              <webforumsuser@macromedia.com> wrote:

              > What do I need to do to be able to edit in design view in Dreamweaver? Or am I
              >doomed to having to edit in code view?

              The problem is that the files being included are complete html pages.
              The included files should only be the code fragments necessary to form a
              complete page when assembled into the including page. They should not
              contain a doctype, <head> or <body> tags.

              Gary
              • 4. Re: question about php pages
                WyndWoman Level 1
                :blush:
                Yeah, that file was quite a mess, wasn't it? body tags? They're over-rated anyway. There's a certain risk to copying and pasting from other projects - copying too much, not copying enough... And middle-aged people should not try to do anything after 10:00 pm.

                Thanks everyone for the help, especially in understanding the SSI requirements. I've stripped down the include files and cleaned up the html in the main page (one doctype!). That seems to have done the trick.
                • 5. Re: question about php pages
                  WyndWoman Level 1
                  :blush:
                  Yeah, that file was quite a mess, wasn't it? body tags? They're over-rated anyway. There's a certain risk to copying and pasting from other projects - copying too much, not copying enough... And middle-aged people should not try to do anything after 10:00 pm.

                  Thanks everyone for the help, especially in understanding the SSI requirements. I've stripped down the include files and cleaned up the html in the main page (one doctype!). That seems to have done the trick.
                  • 6. Re: question about php pages
                    Level 7
                    Good luck!

                    --
                    Murray --- ICQ 71997575
                    Adobe Community Expert
                    (If you *MUST* email me, don't LAUGH when you do so!)
                    ==================
                    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                    ==================


                    "WyndWoman" <webforumsuser@macromedia.com> wrote in message
                    news:gg4rg2$l2p$1@forums.macromedia.com...
                    > :blush:
                    > Yeah, that file was quite a mess, wasn't it? body tags? They're
                    > over-rated
                    > anyway. There's a certain risk to copying and pasting from other
                    > projects - copying too much, not copying enough... And middle-aged people
                    > should not try to do anything after 10:00 pm.
                    >
                    > Thanks everyone for the help, especially in understanding the SSI
                    > requirements. I've stripped down the include files and cleaned up the
                    > html in
                    > the main page (one doctype!). That seems to have done the trick.
                    >