[an error occurred while processing this directive]
November 1999
Dreamweaver 2.0
(but DW3 is pretty much the same)
Here's some help emails I wrote to a friend about using the excellent webpage creation tool called Dreamweaver. He was switching over from the absolute piece-of-shit rip off of DW called Microsoft Front Page (surprise surprise, Microsoft did a half-ass ripoff of a very good program and came up with something with maddening shortcomings), so these instructions are a little Frontpage-centric, but they should be useable by anyone. |
>I've got Dreamweaver. congrats >Looks pretty cool. yes. when i first poked around it seemed pretty minimal, like it didn't do that much, and now it seems like some super powerful behemouth. it's got a weird philosophy, i suspect one that comes from the unix types, which is that it does very little but lets you configure the hell out of it in very fundamental ways, so in the end, as you learn the prog, its monstrous. > I opened up some pages from FP >and played a bit. I could use some starter tips. Here goes: As in FrontPage, it's got a Site Manager section and a Webpage Editing section. First thing you'll want to do is configure things by going to the preferences dialog area. You get to it from the sitemanager, edit/preferences. Almost every configuration you can make to DW is in this area. Note that it's relatively unconfusing and uncluttered. The changes I made: External editors html, set to notepad (windows/notepad.exe) (By the way, the version of notepad I like is called Notepad+. Go to download.com and search for "notepad plus". It's another one of those sighs of relief after using the piece of crap regular notepad.) image editor, set to photoshop HTML rewriting uncheck all boxes. this way it won't fuck with your code unless you tell it to. (you can sigh in relief now) Preview in browser add netscape, IE, etc. here. make sure netscape is checked as "primary browser". now when you're editing pages, just hit F12 and it shows you the page in netscape. Note that the way it previews is different than FP it saves it to a temp file, then opens that temp file in netscape, so you don't even need to save the page before previewing. Site FTP I like to show local files on the left (it defaults to right). seems more intuitive to me, more like what we're used to with CuteFTP. you'll be showing the server's files on the right once you get everything setup. Now you're ready to define your site. You do this once then you're done with it. So in the site manager, go to site/new-site. In the window that pops up Site name = whatever you want to call it (I call mine wrybread) Root folder = where your site is on your harddrive. If you're still going to use FP, or at least in the transition period, point it to your FP web. HTTP address = http//wrybread.com/gametone/. I'm not sure what this does, but what the hell. I check the cahce management box at the bottom. That's another minor thing, it makes the link updating faster if you move files around and change the links. Then at left scroll down to the category "Web Server Info". Server Access = FTP That should make more options appear. Now put in the same data as is in CuteFTP, which is FTP Host = Wrybread.com Host Directory = /gametone/ (I put just /, but I guess you'd put /gametone/) Login= wrybread PW= whatever the hell our current pw is Check the "save" box. Click OK. Now you should see your list of local files on the left side. You browse through the site exactly as you do in FP (no coincidence). Now to connect to the server, click the little "connect" icon that's in the center top of the screen. If your settings are correct in the ftp setup, you'll see the server files on the right, exactly as in CuteFTP. Two ways to upload/download Note that it uses the term "get" to download from the server, and "put" to upload to the server. The most common method you'll use to upload to the server is by clicking your local file and selecting "put". Neat DW feature #1 It will upload that file to the exact corresponding directory on the server. So if your local file is gametone/foo/index.shtml, and you click on the index.shtml file and select "put", it'll send it to "gametone/foo/index.shtml" on the server. You don't need to sync up the server and local folders before uploading as you do in CuteFTP. Neat DW feature #2 By default, it will ask you "include dependant files?". What it wants to know is whether you want it to also upload all the images and ram files etc. linked to in that file. So if you write a page with 30 images in it, you just click "put" index.shtml, and it will send that page as well as the 30 images, and it sends them all to their proper directories. If their directories don't yet exist, it will create directories for them. Amazing, brilliant. Neat DW feature #2a Conversely, when you download a page it asks you if you want to include dependant files. So, for example, if you want to download a page I've been working on, and you click "include depenant files", it will download that file as well as all its images. Phew. (Sidenote however, since your Site is at /gametone, you might have to define a new Site to download stuff from just the root /. That's easy to do, you can have many Sites in DW no problem. Just call the second Site "wrybread", and set the root folder in the FTP configuration to just "/"). If you turn off the "include depenant files" dialog, you can turn it back on from the preferences menu. Note that DW doesn't have the "publish new pages" of FP, but you'll get used to that quickly, fear not. The other way to up/download is to drag and drop. The advantage of this method is you can place files in whatever directory you want. EDITING WEBPAGES Click a page in your site manager to open it. Maximize the window that opens up (they have a maddening habit of opening up small). Now you'll see a bunch of pallettes ala photoshop. The pallette you'll use the most is the "properties" pallette, so close all the other pallettes for now. At the properties pallette's bottom right is a "more/less" arrow. It defaults to "less" for some reason. You always want it in "more" mode, so click that arrow. It will then always be in "more" mode. ("More" mode shows you more info). The properties pallette changes as you click on different things. Click on regular text and you get text info, click on an image and you get image info, click on a table and you get table info. It's settings are semi-intuitive, and the best way to learn them is just to screw around. This is the central control interface in DW, so take your time and learn it well. Don't rush this one. So to get you started, try highlighting some text. Now set its font to something. I almost always use the "verdana, helvetica, whatever" one. You can add new font combinations here later if you want. (Note that what the "verdana, helvetica, whatever" is tell the browser to first show the font as verdana if they have that font on their computer, and if they don't have verdana, try helvetica, etc.) Now click inside an existing table. You'll get the table cell properties by default, and if you want whole-table properties, hit ^A (for select all). There's your table properties. For images, click it and you get image properteis. As I said, learn this one well. My advice would be to fuck around with it when you're not trying to get something done, but just trying to explore the prog. The properties are important. PULL-DOWN MENUS Obviously not everything is done from the properties pallette; you'll also use the pull-downs at the top. The logic here is a bit different than FP, so give your brain some time on these as well. Once you learn it though you'll love it, trust me. Just push through it here. The two pull-downs that I use most often are the Insert and the Modify. You do things like insert images and tables using the Insert menu, and you edit them using the Modify. So for example, if I want to insert a picture, position the cursor where you want it, then hit insert/image. You browse your harddrive to find the image. The first time you do this it'll probably start in a directory outside your site, but next time it'll start where your last image was. Then note that you can click on that image and get it's properties. It doesn't put in any irritating alt text by default, and if you make a link from the image it defaults to border=0, halleluja. So click the image you just inserted. In the center of the properties pallette you'll see "Src", which is the relative location of the image (since the html tag for an image is "image src=/[location]"), and then below that you'll see "link". If you want to make the image a link, click the little folder next to the field and browse to what you want to link to. Easy. Note that you can EDIT THAT IMAGE IN PHOTOSHOP by right clcking the image, and select "edit image". That will load it in your external image editor, which you previously set to Photoshop. And unlike FP's way of doing this, it actually works. **DW Problem #1 Dreamweaver doesn't like Frontpage's image maps. This is a serious pain in the ass. The only solution I've found is to completely redo the imagemaps. So all those old links we did in imagemaps, either don't edit them at all (in which case they'll be fine, since DW doesn't rewrite anything without asking you first), or, if you need to edit them, just delete the damn thing and reinsert the image. If you want to do an image map in DW, right click the image and select "map". If you want to CHANGE THE IMAGE DIMENSIONS, you'll see the fields at left on the properties pallette for that. Note that if you want to change only one variable and have the other variable adjust proportionately, delete variable X before changing variable Y. In other words, if you want to change the dimension of an image whose original dimensions are, say, W=100 and H=75, and you want to make it 150 pixels wide and have the height change proportionately, first delete the height variable, then change W to 150. If you want to change W-150 and keep H=75, just put in W=150, H=75. Note that it bolds any dimensions that have been changed. Voila, try it, it's easy. As with everything in this program, you sense human intelligence behind it, as opposed to some lazy piece of crap slapped together program from Microsoft. As with all the various incarnations of the properties pallette, play around with the different options just to see what they do. There really isn't that much to this program, so it's easy enough to try absolutely everything the program can do. INSERTING A TABLE is very similar, you just hit from the pull-down menuss insert/table, then fill in the options. Then you click and drag the table dimensions around. Neat DW feature # whatever FP had trouble inserting tables inside tables, which goes a long way towards relegating it to the realm of crap ass Microsoft product. One huge way to get design control over your pages is to "nest" tables, i.e., put tables inside tables inside tables. In DW it's a snap, just position the cursor, hit insert/table again. And again, whatever. To put background images in tables - to put a background to a cell, click on that cell, then note that there's two fields in Properties called "Bg". That's annoying, but it's semi self explanatory when you see that one has a folder next to it and one doesn't. The one with a folder is to browser for BG image, and the other one is for setting BG Color. To insert rows/columns - it's under the Modify pull-down. Modify/table/insert-row or insert-column. Note that the option just below that, which is "insert rows or columns", gives you the extra option of inserting before or after the current row or column. - you can also this by right clicking in the table cell. YOU CAN ACCESS A LOT OF OPTIONS IN DW BY RIGHT CLICKING. It's almost exactly like the properties pallette, the way the options change depending on where the cursor is. SETTING PAGE PROPERTIES You set your page properties, such as page name and bg color, either by going to modify/page-properties, or, as you'll do more often, hitting ^J. Note that DW has an absolutely fabulous color picker. It's like photoshop in that you can click anything on that page and use its color. So you can click an image (that's open in DW) and use that color, or you can select from its pallette of websafe colors. You get to the color picker in text color, table bg color, table cell color, wherever. It's great. EDITING YOUR HTML You can click F10 to see your HTML, which works semi well. Note that unless you click on the HTML pallette that pops up when you hit F10, things are confusing. A better way to edit your HTML is to use an external editor. Enter Notepad+. If you set things up correctly in your preferences, you should just have to hit ^e (control-e, for external editor). Now your page is open in Notepad. You can make any changes you want, then save your changes and close notepad. Then when you tab over to DW, it will say "this page has been edited outside DW, would you like to reload it?" Clicking yes will reflect any changes you made in Notepad. Nice. This they refer to as "Roundtrip HTML", and it's considered one of the great features of DW. An advantage to using F10 to make small changes in your HTML is that it will prompt you to the spot in the HTML where your cursor is. So I use F10 for minor changes, and external editor for making major changes. **NOTE THAT THE INSTANT YOU OPEN A PAGE IN FRONTPAGE, ANY CODE YOU HAVE WRITTEN WILL BE REWRITTEN BY FP IN ITS VERY SLOPPY AND UNREADABLE WAY. So any page you create in DW you'll want to keep away from FP, at least try your best to. Of course there's no real harm done by opening in FP, but you lose the nice neat code that DW creates. Code that DW creates is very easily understood by humans, whereas the stuff FP creates is a massive garble that only computers can read, if at all. HTML is pretty simple, but you don't know that when you only use FP. KNOWN DREAMWEAVER PROBLEMS 1) I already mentioned the image map thing 2) sometimes it puts in an extra hard return at the bottom of the page and between objects. This is irritating. The only way to get rid of it is to click where the extra space is, then edit out the return code in the HTML. So click where the space is, then hit F10, then you'll see a code. That's the paragraph code. You have to delete it and it's contents, which will probably be " ", which is the code for hard-space. Get the closing code as well. So the full code you're deleting is " ", which is a paragraph code surrounding a hard-space. (Sidenote DW puts the hard-space code in there just so the html code will have some contents, since html codes with absolutely nothing between them get ignored by browsers). 3) DW also doesn't like the forms we've been using to get feedback from the site, and it will rewrite them without asking you if you move the form around. I don't know why. It's the only time DW rewrites something without asking. It's a bug. It adds a single property to the form that will semi screw things up. The property it adds is a "name = "submit"" after the " ", so the full line reads . What you have to do is delete that extra value from the form. It's not the end of the world if you don't, since all that happens is in the message you receive there'll be the words "Submit send it" at the end of your message. IMPORTING FILES TO YOUR WEB Dreamweaver has a differnet and much more intuitive way of thinking about your site than FP does. FP saves everything in extraneous files that save info like what files are in your site, etc. Hence to bring a new file into your FP web you have to "Import" that file. Ugh. In Dreamweaver, just copy the file directly in. So to import some images, just copy them to the folder you want them in Dreamweaver and it's done. In other words, if you want to copy some images to gametone/foo/pictures/, just drop those images in taht directory on your harddrive. Halleluja. That's also why I say DW and FP are compatible DW will be able to work with FP with minimal fuss, though if you add any files through DW you'll still have to Import them in FP for FP to recognize them, that damn klutz. PREVIEWING IN BROWSER Hit F12. You'll do this all the time. As I said, it creates a temporary file so you don't need to save your file first. A minor problem is that DW doesn't like .shtml files, just as FP doesn't. It'll preview them fine, but it won't open any links to .shtml files. Minor ugh. JAVASCRIPT ROLLOVERS Easy as pie position the cursor hit insert/rollover-image (look for it, it's there) The options here are semi-selfexplanatory. Name the image any old thing or keep the default Image1, and note that you have to have a link for all javascript events, so use "#" for no link. (The # makes it so if someone clicks it, nothing much happens, since "#" is the html code for "bookmark", as in when you want to load a page to a certain point in the page.) MAKING STUFF FLY AROUND This is the really fun stuff. The principle is you're using something they came up with in 4.0+ generation browsers called Layers, and then you're controlling that layer with javascript. Surprise surprise, you don't do shit, you just tell DW what to do. It's easy. 1) Create a layer. For practice, do this on a blank page (hit file/new page, then save that page.). Then hit insert/layer. 2) Now type something in that layer. 3) Now notice that when you click on the layer you get little boxes outlining the layer box. If you don't get these boxes, it means you're not clicking right on the layer itself, so keep clicking around until you do. You can use those to resize the image, and clicking on the large top left box lets you drag the layer around. 4) Right click on the layer. You should get a pulldown menu containing the option "Record Path". If you don't get that pull down menu, then first left click on the layer until you get the layer outlined with the boxes, then right click on the layer again. 5) Once you have the record path option visible, select Record Path. 6) Now drag the layer by the big top left box. If you don't see the top left box on the layer, go to (3). 7) Now drag the layer around. This will be the path that your moving layer takes. You should see a dotted path being left behind the layer. If not, go to (3). 8) When you've dragged the layer around to your heart and mouse's content, stop. 9) Now you have to open the Timeline Pallette. Note that dreamweaver probably opened this window automatically when you dragged the path of the layer. But if not, like all pallettes, you open it by going to the Window pull-down menu. So hit window/timeline. 10) Now you'll see some data on that timeline. That's the path of your layer. If you record more paths or add to that path, you'll see it added to the timeline. If you want two things moving at once, you'll add it to the timeline. Play around with this, it's powerful. FPS= frames per second, and it's the speed that your timeline plays back. But for just a single basic single thing moving 11) At the top right of the timeline pallette you'll see the options "autoplay" and "loop". If you don't see the "autoplay" and "loop" options, widen the Timeline Pallette. Check both of these. That will make the layer move when you load the page, and loop will make the movement repeat. You can edit all these things at any time. Now preview the page in your browser by clicking F12. If your layer isn't movingn around, make sure the layer contains something. Maybe you didn't type the text directly into the layer, maybe you typed it underneath the layer, etc. Play around. You can also put images, tables, whatever in the layers. You can resize the layer however you want. Just don't put a layer inside a layer (which is a "nested layer"), since Netscape can't handle it yet (IE can). PART II, a bit more advanced, but still easy. USING THE BEHAVIOR PALLETTE After the Properties Pallette, the Behavior Pallette is the biggie. The "behavior" is short for "javascript behavior", which means it's the interface DW uses to apply javascripts to elements in your page. No, you don't need to know a thing about javascript to use it, that's why it's called an "interface". It has all been automated. So for example, create a javascript rollover using that method we did earlier (insert/rollover-image). Now click on that image and open the Behavior Pallette. You'll see: onMouseOut - Swap image restore onMouseOver - Swap image The first line tells it to restore the original image when the mouse moves off the image (MouseOut = mouse moves away), and the second line tells it to swap images when the mouse moves over the image (i.e., onMouseOver). You can click either of these parameters to edit their behaviors. So if you want to change the image that will appear onMouseOver, click the second line (the one with onMouseOver in it). Note that there is also a little pull-down arrow in the center of that field. Clicking it lets you decide what sort of event triggers the behavior. So click the second line, which is currently set to trigger the event when the mouse moves over the image (i.e., onMouseOver). Note the other options on there. Experiment with these options, they're pretty self-explanatory. Just for practice, switch the Swap Image parameter to "onClick". (Click the parameter, then click the center pull-down arrow). Now preview the page in browser (F12). Now click the image. Notice that it no longer switches images on MouseOver, but only onClick (i.e., when you click your mouse). Important Sidenote: you can only apply javascript behaviors to something (text or image) with a link. So notice that DW made that image a link to "#". That's a standard dummy link. YOU NEED A LINK FOR ALL JAVASCRIPT BEHAVIORS, so if you're not using a regular link, use "#". So, go back to DW. For practice we'll make some text which opens up a new URL if you move your mouse over it: 1. Type some text, and make it a link to # or anything else. 2. Click somewhere on that text, then in the Behavior Pallette click the + (plus sign). That's how you add a behavior. Note that a menu appeared. 3. Now, just for kicks, select "Goto URL". 4. Then in the field type in any URL, it can be relative or absolute. For now, type the absolute path http://wrybread.com/crackcam. 5. By default, DW assigns the action "onClick" to that behavior, which means if someone clicks that text, it will go that URL. So, just for kicks, change that behior to "onMouseOver", which will load that URL the instant someone's mouse goes over that text. To do so, 1) highlight that parameter on the behavior pallette, 2) click the pulldown arrow in the center of that parameter, and select "onMouseOver". 6. Preview in browser, and you should be directed to that URL when you move your mouse over that text. USING DW PLUGINS That list of behaviors that are displayed when you click add Behavior (as in step 2 above) are in fact just a bunch of html files that someone has written and placed in the directory dreamweaver/Configuration/Behaviors/Actions. They're very modular, and anyone who knows how to can write them and add them to DW at any time. The only restriction is that DW has to be restarted whenever something new is added. So you can download Behaviors for a bunch of websites, three very good ones that I've found are: http://www.cybernet.ch/users/massimo/ http://alaji.home.mindspring.com/dreamweaver/ Follow their links section and you'll be solidly in the DW underworld. Neat DW feature # whatever: Every configuration you make to DW is stored in the folder dreamweaver/Configuration. So if you copy that folder and copy it onto another computer and open DW, DW will look exactly as it does on your regular computer. JUST REMEMBER THAT YOU HAVE TO RESTART DW WHENEVER YOU CHANGE SOMETHING N THE CONFIGURATION FOLDER. In that folder the things you'll play with most are: Behaviors - we just did that Commands - are similar to behaviors but insert chunks of code. Play with the Commands Pallette to get an idea of what those are. Objects - similar to Commands. Play around. USING TEMPLATES Dreamweaver has a template feature which is sort of fun. You use it if you're creating multiple-pages with repeating objects. The advantage of using a template is that, even after finishing the pages, you can change one of those repeating objects and it will be changed on every page that uses that template. So, for example, on the pages at http://wrybread.com/baja, all those pages have the same background, and all the content is in the same table. So, if those pages are in a template, and I want to add an element at the bottom of the page to every one of those pages, all I do is make changes on the template and DW will update every page that uses that template. Creating a Template First create a model page. It can have content which won't appear on your template. 1. Hit File/Save-As/Template 2. Call it whatever you want 3. Highlight the text that you want replaced on the template pages (in other words, the text that you don't want repeated on every page, but instead you want to replace that text with other text.). So highlight that text, then 4. click Modify/Templates/mark-selection-as-editable. Name it whatever you want. Notice that DW will highlight that text. 5. Mark whatever regions you want as editable. These are the areas you'll be able to edit on pages that use this template. Anything not marked as editable, you won't be able to touch. It's rigid like that. 6. Now save that template (file/save). 7. Start a new page (file/new). 8. Apply the template to that page by selecting Mofiy/Template/Apply-Template-To-Page. Select your template from the list. If you had more than one template created, they would all appear on that list. 9. Notice that you can only edit the areas you marked as Editable Regions on the template itself. You can create more editable regions at any time by editing the template file, and every file using that template will reflect it. 10. You can create as many files as you want based on that template, and every time you edit the template it will apply those changes to the pages that use the template. Note that after it makes changes to the pages, obviously you will have to reupload those pages if you want your site to reflect those changes. 11. You can detach the page at any time from the template with Modify/Templates/Detach-from-template. 12. Note that the templates are all saved in a directory in your site called "Templates", and they have the extension .dwt (dreamweaver templates). |
|
||||
|
|||||||