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.
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.
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.
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.
You can't in design view because of the server side/PHP code.
Either preview in browser or use live view
Old fashioned Preview in Browser requires a local testing server such as Wamp, Xampp or Mamp to parse PHP code.
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).
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.
I have replaced:
<?php echo $DIR?>/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.