If you do use Dreamweaver, for whatever reasons, here are a few tips to help you out:
- The most annoying thing is that DW doesn't know, out of the box, that a "module" suffix means it's PHP code, so it won't color it. The solution is described here. I added "module," "install," and "inc" as equivalents to PHP.
- The second really annoying, and coding standards violation, thing is that DW will insert tabs into your code rather than spaces. You can address this issue.

- Go to "Edit » Preferences" and locate the category for "Code format."
- Check the "indent option and specify 2 "spaces."
- Set "Tab size" to 2.
- Save your changes.
Frequently (at least before passing it through the Coder module - and you will do that, please), select all (CTRL+A) your code, then right click and choose "Selection;" then choose "Change tabs to spaces."
- While you're in the Preferences page, select "Code coloring." Look for the "PHP" document type and then click the "Edit Coloring Scheme" button. Review the options. The only thing I changed was the "PHP Script Bracket" to a high contrast color (such as dark green or dark blue), but not black. This is because it's something a lot of people get tripped up on. I just wish they would allow different colors for the different kinds of brackets.
- Drupal coding standards call for no PHP ending tag ("?>"), but Dreamweaver really demands it, so include it during development but remove it before committing.
- DW is not really good at "Apply source formatting" for PHP code, so it's up to you.
Recent comments
19 weeks 20 hours ago
19 weeks 20 hours ago
29 weeks 1 day ago
29 weeks 2 days ago
29 weeks 6 days ago
33 weeks 3 days ago
47 weeks 2 days ago
47 weeks 5 days ago
48 weeks 3 days ago
48 weeks 4 days ago