PDA

View Full Version : DWCS4 Newbie needs help


CRey
03-25-2009, 11:09 AM
Hi all,
I am new to DW and have the following problem. I applogise if this is covered elsewhere but I have looked around to no avail.
I have been happily developing a site for a while now and have created a Spry menue bar for nav etc. The problem is that I have started to use php includes for this menu and other common code (I have some links in the sidebar for instance). The issue is that for some reason DW has stopped showing me the results of the include in design view and instead displays the gold php shield instead. This is happening for all my includes.
The site looks and works fine in a browser testing localy using XAMPP.
It's a real pain to edit without seeing the item in design view.
I am pretty sure when I put my first include in it showed up ok in design view, if it hadn't I wouldn't have carried on putting them in other pages. I must be honest and say I'm doubting myself now though :roll: .

I'm told that the include php code must be in a blockm of it's own or this problem will occur,, it is.
Anyone any ideas? Have I done something daft :wink: ?\
Is the a setting I have accidently changed? I've searched help and have a copy of essential gude but can't find anything. :(

Any ideas greatly appreciated.

Regards
Clive

domedia
03-26-2009, 03:01 PM
If it works fine in your browser locally though XAMP, I don;t really see the problem.. Design View should not be used to check if it looks ok in browser.

CRey
03-26-2009, 04:38 PM
If it works fine in your browser locally though XAMP, I don;t really see the problem.. Design View should not be used to check if it looks ok in browser.

Thanks for your input domedia. I totaly agree with your comments.
The problem is ease of editing, I can't acces anything in the properties inspector, so have to edit everything in code view; and having it come up in design view at least gives you a warm feeling when it looks right after a change has been made :-D . I am sure I was seeing the results of php scripts in design view before and am wondering why I can't see them now?
Regards
Clive

domedia
03-26-2009, 05:55 PM
I know CS4 can parse php and show you how it looks (or I'm pretty sure at least), so I know you're right. Can't help you though :-/

CRey
03-26-2009, 09:25 PM
Cheers anyway. I'll post if I get to the bottom of it :confused:

edbr
03-27-2009, 03:39 AM
i never heard of includes having to be in a separates block , design view will show a php symbol so maybe thats why they say separate includes. c4 has live view of course but its as quick to Cntr+shift+U then refresh your browser

CRey
03-27-2009, 09:08 AM
The book I have, The essential guide to DW CS4 with CSS, Ajax and PSP; by David Powers has a chapter on includes and he says in one of his comments "An annoying quirk in the way Dreamweaver handles PHP includes in design view is that the include command must be in its own PHP code block. If you put any other PHP code in the same block -even a comment- Dreamweaver just displays the gold PHP shield".

This intimates that it is possible to see the PHP output in design view, Indeed, all my PHP that is in the actual page displays fine in design view.

I have the include code in it's own block, on a seperate line aka...
<?php include("includes/menu.inc.php"); ?>
but still get the gold shield??

Are you saying edbr that you only ever get the gold shield for php code in design view??

Regards
Clive

edbr
03-27-2009, 10:13 AM
yes until you hit live view
I just rechecked and where i have a simple incude ( example for footer text) , it does show

CRey
03-27-2009, 10:33 AM
OK ebr that's exactly my problem.
Even in my footer where all I have is one simple include I only see the gold php shield in design view and I can't work out why??

CRey
03-29-2009, 04:53 PM
OK, don't ask me why. I have done nothing, apart from switch PC on and off a few times, but I am now seeing my php output in design view???
No idea why it wasn't showing before but it is now so problem solved; unless anyone knows why?
Thanks all who input on this.
Regards
Clive

chibuki
05-19-2010, 06:12 PM
Hello,

I just had the same exact problem with Dreamweaver CS4, searched on Google for solutions, and finally I found this thread.

Dreamweaver suddenly just stopped showing me all PHP includes that I have in my files in Design View. And I know for certain that I didn't do anything major to cause it. I know because my other sites (hosted in separate web host servers) also gets affected while I didn't even touch them. To rephrase the problem, Dreamweaver stopped showing me the output of Design View while it actually works after the site is uploaded to the site.

I've build a few server-side sites that uses PHP includes, formatted exactly as what was shown in post #7 (http://www.dreamweaverclub.com/forum/showpost.php?p=156366&postcount=7) of this thread, yet it's not showing me the output of those includes in Design View.

Dreamweaver always shown me the output before and I've never encountered a problem like this.

I have yet to find a solution for this issue for myself, but it baffles me how the author of this thread solved the issue in post #10 (http://www.dreamweaverclub.com/forum/showpost.php?p=156455&postcount=10) of this thread. Seems like computers are just doing whatever it wants on their own.

http://i48.tinypic.com/23gyars.png

It's also worth noting that the linking tab in Dreamweaver stopped showing the includes -- it usually does. In other words, it's like Dreamweaver suddenly stopped acknowledging the PHP includes in my files (although they do work once uploaded).

DWcourse
05-20-2010, 01:04 AM
In Dreamwaeaver's preferences under Preview in Browser try checking Preview Using Temporary File and see if that changes anything.

deviance
10-25-2010, 09:12 PM
I've spent the last 4 hours googling to figure out why my DW spontaneously stopped showing me my PHP tests in the Design view. I just started messing around with basic php - i.e. this is my day 2. Learning the ropes and what not.

Now my DW is behaving like this!!!!! :( How do I get it to display again in the design view. I know I can use the live view but design view makes it easier to see what im doing instantly instead of having to go back and forth between live view and code view.

DWcourse
10-25-2010, 09:19 PM
If you haven't already, try quitting and restarting Dreamweaver (and maybe your computer). Don't know why but it helps sometimes.

deviance
10-25-2010, 09:55 PM
I've tried both. Multiple times :(

I even tried reinstalling to no avail. :'(

Halp!