HighDots Forums  

DW, PHP & Design View

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss DW, PHP & Design View in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zoo68
 
Posts: n/a

Default DW, PHP & Design View - 07-30-2004 , 11:58 AM






Greetings,

I've been using DW version 3 for longer than I care to admit, but due to a
recent computer upgrade, I'm finally able to use DW MX.

In DW3, when working in design view, I was able to work on pages with embedded
PHP and see everything on the page, even the HTML parts contained within PHP
tags. Not the parsed code, of course, but for example, if there were 3
conditions in PHP and 3 related chunks of HTML, I'd see all 3 HTML chunks in
design view, all at once. This has been enormously helpful in designing and
editing the many complex, multi-page forms I've had to do recently.

Here's the thing: In DW MX, any HTML contained within or between PHP tags does
not show at all in design view; I can only see and edit it in code view. The
design view shows only the "containing" HTML tags, not all the HTML between PHP
tags. According to someone on a mailing list I belong to, this is probably
because prior to MX, Dreamweaver didn't recognize PHP code at all and would
just display everything, showing the page in design view as if the PHP tags
weren't there. Whereas MX recognizes it as server-side code, and ignores the
embedded HTML altogether.

What I'm wondering is if there's a way to change this setting, to tell DW to
ignore the PHP tags entirely in design view as it used to do in DW 3. I've
looked all through the preferences, help files, and on the Web to see if I can
figure out if this is a DW setting that can be changed, but I haven't been able
to find anything so far. Since my forms are fairly complex in layout, I would
much rather do the layout creation and editing in design view if at all
possible.

Any ideas would be enormously appreciated!

kp



Reply With Quote
  #2  
Old   
Randy Edmunds
 
Posts: n/a

Default Re: DW, PHP & Design View - 07-30-2004 , 12:49 PM






kp,

I would start by copying one of your .php pages to have a .htm file
extension and then open it in DW MX to see if that's what you are
looking for. This effectively tells DW to not look for any server-side
stuff.

If that's what want, then this TechNote tells you how to add/remove file
extensions from DW MX doctypes:

http://www.macromedia.com/support/dreamweaver/ts/documents/add_ext_mx.htm

Move the "php" and other file extensions you use from the PHP_MySQL
doctype to the HTML doctype.

HTH,
Randy


Reply With Quote
  #3  
Old   
zoo68
 
Posts: n/a

Default Re: DW, PHP & Design View - 07-30-2004 , 01:07 PM



Hi Randy, thanks a ton for this idea. I copied one of my PHP pages and gave it
the .html extension, but unfortunately the same thing happens as before - the
PHP-embedded HTML doesn't show up in design view.

Since this didn't work, I guess moving the PHP extension in the doctype's not
going to work either, huh?

kp


Reply With Quote
  #4  
Old   
Randy Edmunds
 
Posts: n/a

Default Re: DW, PHP & Design View - 07-30-2004 , 08:12 PM



Quote:
I copied one of my PHP pages and gave it
the .html extension, but unfortunately the same thing happens as before - the
PHP-embedded HTML doesn't show up in design view.
You may need to remove the PHP directive definition from the
Configuration/ThirdPartyTags/Tags.xml file.


Quote:
Since this didn't work, I guess moving the PHP extension in the doctype's not
going to work either, huh?
That's correct -- moving the PHP extension only saves you the work of
having to rename every .php file to .htm (and back!).

HTH,
Randy



Reply With Quote
  #5  
Old   
zoo68
 
Posts: n/a

Default Re: DW, PHP & Design View - 08-02-2004 , 04:52 PM



Hi Randy,

Hmm, very interesting, thank you!

Quote:
You may need to remove the PHP directive definition from the
Configuration/ThirdPartyTags/Tags.xml file.
I commented out the PHP directive as suggested and when I opened one of my PHP
files in question, it now shows some of the PHP code in design view - but still
not the embedded HTML. I feel like I'm sooo close to a solution now!

kp



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.