Page 1 of 1

No design view option in Dreamweaver with PHP script

Posted: Mon Dec 15, 2003 3:36 am
by Daynig
Hi All,

I'm new to PHP and am writing my first scripts with the aid of some tutorials in a few magazines I've got.

Having installed Apache, PHP and MYSQL on my PC (all running hunky dory), I'm editting a PHP/HTML script. The script has an HTML table and I ought to be able to see the table in Dreamweaver's (MX) Design View.

Unfortunately I can only get code view. The Design and split view options are greyed out. Since I need (want?) to edit the table itself and enter values easily etc, I'd much prefer to be in split/design view.

Am I missing something here? All other script types seem to offer design view when I create them but not any php file that I create. I've mailed Macromedia but so far no response.

Many thanks in advance,

Nigel

Posted: Mon Dec 15, 2003 3:37 am
by Alexia
.php files in DW mx dont show html i believe, you could make the .html files then include them i so'pose

Posted: Mon Dec 15, 2003 3:45 am
by JayBird
yes, you can view .php files in design view in dreamweaver MX.

have never come across the spilt and design view buttons being greyed out.

Not sure what the problem is....

Mark

Posted: Mon Dec 15, 2003 3:51 am
by malcolmboston
ok cool (prolly not the right phrase)

i had this little over a week ago when migratnig to windows 2003 server although it happens because of a bug in dreamweaver that is rare but does happen

reinstall DW and it works, remember 2 back up all of your files for christs sake!

please note after reinstalling it, u will need to reinstall all of your DW extensions

Hope this helps

Posted: Mon Dec 15, 2003 3:59 am
by Daynig
Thanks mb, I was afraid that's what someone would say.

Let's hope that DW and Windows XP remember where all my files are and don't get cute with each other :?

Posted: Mon Dec 15, 2003 3:59 am
by JayBird
to back up all your dreamweaver setting, check this handy utility

http://www.joexx.de/DW-Exporter/index_en.php

Mark

Posted: Mon Dec 15, 2003 4:01 am
by malcolmboston
np mate

i was sh!t scared when it happened to me because it wasnt just scripting it was a PHP/HTML hybrid complete with sexy HTML design, nearly threw my computer out of the window when i had to rely on HTML coding for 3 days

Good luck hope it all works out for ya

Posted: Mon Dec 15, 2003 4:55 am
by m3mn0n
Thank you so much for that link.

*tears of joy*

Posted: Mon Dec 15, 2003 6:31 am
by Daynig
Yup, thanks again mb, worked a treat.

Mark, I tried the beta version of DW-exporter (having MX-2004) and it didn't re-import all my site definitions. Got an error the first time (only seleced to import the definitions, not all settings a files) and then it seemed to have run OK. Going into DW showed no site definitions though.

Not too big a deal as I only had a dozen or so sites simple defined and not much customisation of the settings (yet!). Thanks for the pointer tho'.

Nigel :D

Posted: Mon Dec 15, 2003 5:00 pm
by uberpolak
In case anyone else has a similar problem, a while ago I was teaching Dreamweaver MX to some grade-school kids, and a lot of them were having the same problem, but in that case because they weren't saving their files with the right extension. They weren't using an extension at all, and Dreamweaver was assuming .txt (why it wouldn't default to .htm or .html I have no idea). The programme assumed there was no design to view on a text file, so it dodn't enable those buttons.
The moral of the story is, before you go through a (potentially) massive backup and reinstall, check your extensions, that could be the problem (sounds like that wasn't the case here, but for future reference, I thought I'd post this).

Posted: Thu Dec 18, 2003 2:47 am
by Daynig
I've just had a response back from Macromedia:

"Please go through the following tech note: http://www.macromedia.com/support/dream ... deview.htm

I tested here and by adding .php under Edit/Preferences/File Types Editors/
the split and design view became grayed out. Remove the .php extension from this is list and this should enable your PHP pages to be opened in design view as well."

I had indeed added PHP to the list of filetypes that should be opened in Code View - although this shouldn't result in not being able to view them in Design View. Sure enough, simply removing PHP from the list restores Design and Split views as options.

Nigel