Sunday, April 4, 2010

Server Side Includes Don't Show Up?

I support a web site and I've been maintaining it with DW (previous to CS3 and now I'm using CS3) and except for the home page, whenever I test a page locally on my PC, the content of the includes don't show up in the browser.?Once I upload them to the web site, they work fine.?I should point out that the home page is the only page in the root directory.?All the other pages are in a next level folder.?At the time I designed the web site, I thought this would help me organize things, but I regret doing it.?This has happened with the previous version and with CS3.

Anyway, it's what I'm stuck with.?I've set up my local site without server access.?Given my situation, is there anyway to get the includes to work on my PC when I test the pages within DW?

Server Side Includes Don't Show Up?

You must be running a webserver on your local system and the site folder needs to be set up in the OS and in the web server.

Server Side Includes Don't Show Up?

In Dreamweaver,?the F12 browser preview should show them...?Are you saying that they aren't showing up there or in design view?

I would almost suspect a path issue,?but if they're working online,?Hmmmmm

When you load up the page in Dreamweaver,?is it loading up all the external files as well??(See Screenshot Attached.)

That is correct, they don't show up in browser preview or design view.?Here's an attached screen shot.

Rob Hecker2 wrote:

You must be running a webserver on your local system and the site folder needs to be set up in the OS and in the web server.

I had not realized that Dreamweaver has a method of recognising includes, so my previous post does not apply. Sorry. Since all my pages use PHP, I run a local server to preview them.

Open the Preferences panel from the Edit menu (Dreamweaver menu on a Mac), and select Invisible Elements. Make sure that the checkbox labelled ''Server-Side includes: Show contents of included file'' is selected.

It's also important to make sure that your server-side includes contain only fragments of the page. There should be no DOCTYPE declararation, %26lt;html%26gt;, or duplicate %26lt;head%26gt; or %26lt;body%26gt; tags in the include files.

While in Preferences, also select Preview in Browser, and choose the option to preview using a temporary file.

David_Powers wrote:

Open the Preferences panel from the Edit menu (Dreamweaver menu on a Mac), and select Invisible Elements. Make sure that the checkbox labelled ''Server-Side includes: Show contents of included file'' is selected.

It's also important to make sure that your server-side includes contain only fragments of the page. There should be no DOCTYPE declararation, %26lt;html%26gt;, or duplicate %26lt;head%26gt; or %26lt;body%26gt; tags in the include files.

While in Preferences, also select Preview in Browser, and choose the option to preview using a temporary file.

On further use of DW, I realize this problem is not fixed.?First, I stated the problem poorly.?Let me try again.?If I am working on any page in DW and press F12 for Firefox (or ctl-F12 for IE) that page will display the server side includes in the browser.?One of those includes is a menu of links to other pages.?If I click on one of those links in the current browsing session, the linked page does come up, but any includes are not displayed.

To summarize: I press F12 to start a browsing session and that page is displayed properly with server side includes.?While in that browsing session, I click on a link to another page, and that second page in the browsing session does not disply the server side includes.?When these pages are uploaded to the server, they work properly.

I was looking around to see if I could mark this question unanswered, but couldn't find a way to do it.

jangell2 wrote:

If I click on one of those links in the current browsing session, the linked page does come up, but any includes are not displayed.

To summarize: I press F12 to start a browsing session and that page is displayed properly with server side includes.?While in that browsing session, I click on a link to another page, and that second page in the browsing session does not disply the server side includes.?When these pages are uploaded to the server, they work properly

Nadia-P wrote:

To summarize: I press F12 to start a browsing session and that page is displayed properly with server side includes.?While in that browsing session, I click on a link to another page, and that second page in the browsing session does not disply the server side includes.?When these pages are uploaded to the server, they work properly

No comments:

Post a Comment