• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Images not displaying in Design View

Community Beginner ,
Aug 06, 2019 Aug 06, 2019

Copy link to clipboard

Copied

How do I get images to display in the design view?

The images has a PHP code to them with <?php echo $DIR?> at the beginning.

The images appear in the live preview which obviously then runs the PHP server script.

Screenshot 2019-08-06 at 17.15.34.png

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2019 Aug 06, 2019

Copy link to clipboard

Copied

As far as I know, there isn't a way to get Design View to run scripts of any kind.

It's always been that way, a bare bones, framework view that really has nothing to do with your design, but that doesn't fit on the tab, so they call it Design View.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

How does one work blind like this!!? When looking at the code to make amends, it's such a slow process to find what you are looking for quickly without any 'live' preview. One would select i.e. a picture in Dreamweaver 'design' view and then it would select the code in the 'Code' window for normal HTML sites. Wondering how people work efficiently with PHP sites? (Do people use different software?)

To work like this adds many, many hours to the job! Any suggestions on a better process would be greatly appreciated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2019 Aug 06, 2019

Copy link to clipboard

Copied

Switch to Live View.  

Design view is mainly for plain vanilla, static HTML rendering.  It cannot parse PHP code or handle advanced CSS.   Design is useful for quick editing of text, DW templates and image maps.  But beyond that, it has little value.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2019 Aug 06, 2019

Copy link to clipboard

Copied

You can't in design view because of the server side/PHP code.

Either preview in browser or use live view

Paul-M - Community Expert

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2019 Aug 06, 2019

Copy link to clipboard

Copied

Old fashioned Preview in Browser requires a local testing server such as Wamp, Xampp or Mamp  to parse PHP code.

Setting up a PHP development environment for Dreamweaver | Adobe Developer Connection

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

I already have since setup MAMP properly but it won't preview in the 'Design' mode, only 'Live' mode but this is no good as one can't select .i.e a picture or element for it then to select the code in the 'Code' window (using split screen).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

Design View won't help you with PHP files. 

To work with HTML elements in PHP files, double-click in Live View.  See screenshot.

It goes without saying that working with sever-side code and database driven content is NOT the same as working with a static HTML site.  If the content comes from SQL statements there is nothing to select,  It's all code driven.  Likewise, if content comes from a  server-side include statement, you must open & edit the include file. 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 15, 2019 Aug 15, 2019

Copy link to clipboard

Copied

LATEST

I have replaced:

<?php echo $DIR?>/images

with:

../images

and I can now select the images in 'Live' view which then selects the code in 'Code' view. This seems to be the only workaround.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines