Dreamweaver CS4 Basics 2 Adding Pages

HSC IT Center Training Email: [email protected] Web Page: http://training.health.ufl.edu

This page intentionally left blank

Dreamweaver Basics 2

Contents Dreamweaver Basics 2 ........................................................................................................ 5 Creating additional pages .................................................................................................... 5 Adding a Navigation Bar ...................................................................................................... 7 Test the Site ...................................................................................................................... 8 Putting the page on the Web................................................................................................ 8 Post the website to a server................................................................................................. 8

Diane Millican Training Specialist Information Technology Center Health Science Center PO Box 100152 Gainesville, FL 32610-0152

352-273-5051 [email protected] http://training.health.ufl.edu

This page intentionally left blank

Dreamweaver Basics 2 Creating additional pages When creating new pages, there are a couple of options. You could start the same way you did with the first page by opening a new blank html page. Another way is to duplicate the original page and delete what you don’t need and add the new content. One way to duplicate the page is to open it in Dreamweaver and then use the Save As command in the File menu giving the page a new name. Another way is to right click the page name in the files panel, choose edit and then duplicate.

For this workshop we have a completed first page. We can change the look of the page by clicking on the Page Properties button in the Property Inspector. The Page Properties dialog box will appear. Set the Page Font information, Background color, margins. Once your page is the way you want it you are ready to create more pages from this original page.

After creating the new page and giving the page a new name o Delete all unnecessary information o Merge or split cells as necessary o Add content – Format as necessary (ie. H1) o Add images o Give the page an appropriate title and save For the second page in our site we are going to add a text file (city_facts.txt) and a new nested table to add a few pictures to the bottom of the page. The .txt file can be selected in the files panel and dragged onto the page or it can be opened by double clicking in the files panel and then copied and pasted into the page. Dragging files may create extra line breaks that will need to be deleted. Copying and pasting may take an extra step, but seems to add fewer extra spaces. For the third page we will use an existing table of facts created in Word (services.doc). As with the .txt file, the .doc file can be selected in the files panel and dragged onto the page or it can be opened by double clicking in the files panel and then copied and pasted into the page.

The last page in the site will be a map page with a rollover image. A rollover image is two images located in the same space. One image is the base image. Then, when the mouse is over the image the second image shows. Move the mouse and the first image takes its place again. 1. Using your first page, create a new HTML page. Save the page. Give it a title (In the Document toolbar). This will be our Map page. Type and format the Heading (Gainesville Driving Directions) on the page. 2. Click to place your cursor in the proper table cell. In the Common Insert bar, click on the small triangle next to the image button. In the drop down box, choose Rollover Image.

3. Use the browse buttons to locate the images. Select the images to go on the page. The standard non-rollover picture is the Original image. Also check Preload Rollover Image to make the image cache in the browser so the picture will load quickly. As with all images, type in an alternate text. Click OK. Save the page and preview in the browser. Test the rollover image to make sure the pictures swap out as the mouse rolls over the image.

Adding a Navigation Bar Once you have a group of web pages you want to make sure that anyone looking at the pages can maneuver through your site at will. We will use a table to add a navigation bar. 1. Open your Home page. Insert a table with 1 row and the # of columns to match the number of pages in your site. Use 0 for border, cell spacing and add 10 in cell padding. Set the width at 90%. Click OK. 2. The table is on the page and selected. While it is still selected, use the Property Inspector to align the table on the page by choosing Center from the Align drop down box. If the table is not selected, it can be selected easily by clicking on the tag in the Tag Selector on the Status bar. 3. Click in the first cell and drag your cursor through the cells to select the whole row. Click on the Align Center button on the Property Inspector to align the contents of all the cells to the center. 4. Type a name for each page in each cell. 5. Select the name in the first cell. Using the Point to File button in the property inspector next to the Link text box, click hold and drag to the proper file in the file panel. The Point to file button will automatically fill in the Link box for any file in your file panel.

6. Repeat the process for each page. 7. Save the page and preview it in the browser. Make sure all the links work properly. Now we need a way to get back to the home page and move around the other pages. 8. On the Home page select the Navigation table by clicking in the table and then selecting the table tag in the tag selector in the status bar at the bottom of the page. Copy the table (Edit> Copy or CTRL+C). Open your other pages and paste (Ctrl + V) the table on each of the other pages in your web site. Another option is to use Dreamweaver’s Navigation Bar. This requires four images for each link that are exactly the same size. You need an image for Up, Over, Down, and OverDown. Once you have all four images prepared for each link, go to the Image insert button and choose Navigation Bar. Give the link an Element Name and then browse for each image. Add the URL for the link and make sure Preload Images is selected. You may want to select Show “Down Image” initially for the page you are currently working on. Decide if you want the bar to be vertical or horizontal and whether you need it to be in tables. Once the first link is finished, click on the plus to add additional links. When finished, click OK and you will have a new Navigation Bar on your page. When your bar is finished, you can select the Navigation Bar and paste it on each of your other pages. Then from the Modify menu item, choose Navigation Bar and then you can change the initial state of the button for each current page.

Test the Site Before you put your site on a server it is best to test it on your local machine. 1. Open your Browser (Internet Explorer, Netscape, Mozilla, etc.) 2. From the browser Menu bar choose File > Open. Locate your root folder and choose your home page (index.htm). Your site should open in the browser. 3. Test all the links, both the links to your pages as well as the external links to other sites. Test to make sure the email links works. (Don’t send email; just make sure it brings up the email client.) Remember to get back to your site from other sites you may have to use the browser’s Back button.

Putting the page on the Web There are a few ways to get the website “live” and viewable by the public. Many departments have a public folder that will allow you to copy your website in the folder and get a URL so anyone can navigate to the website with a browser. Another way to post the site is to use FTP. That is a File Transfer Protocol. FTP is a process where the files are uploaded to a server and are then available for viewing. Many email servers allow a certain amount of space for personal websites. The Host of your website (the owner of the public server) will tell you how to get your files uploaded to their server. Check with your department IT person as to how this would be done in your department.

Post the website to a server To start the process to upload your site to a public server, go to Site > Manage Sites in the Dreamweaver menu. In the pop up dialog box choose the correct site and click Edit. This will bring up the Site Definition dialog box that was used to set up the local site originally. This time choose Remote Info Category on the Advanced tab. For our class and for many departments there is a public folder that is on a network server. In the Access list, choose Local/Network. For the Remote folder, browse to the server where the web page will be located (if a folder is not already created, create that folder now). For this class we have a public server set up on the classroom computers. To set up the Remote Info for Dreamweaver in this classroom, locate drive W: Web. Once this is completed, click on the OK button. Click Done in the Manage Sites dialog box. In the files panel, select the site name (when selected it will be dark blue) and click on the blue Put button (looks like an arrow pointing up). If a warning box comes up asking if you want to put the entire site say Yes. An alternate method to get the site root folder on to the server is to drag it from your computer and dropping it in the public folder. Choose the remote root folder. Checking Maintain synchronization information will keep track of which pages are newest, the one on the server or the one you are going to upload. Checking Automatically upload will uploaded your pages to the server each time you save them or you can uncheck that box (recommended) and upload manually when you are sure they are the way you want.

Enable check in and check out is appropriate if more than one person is working on the web site. This would prevent two people working on the same page at the same time. Each time someone “checks out” a page no one else can work on it on the server at the same time. Click on OK on the Site Definition box and Done on the Manage Site box. After the remote site is set up and the files have been copied, open Internet Explorer. In this training room, there is a link at the top of the page called T-Web. Open that page and locate your computer by name. Open your file and double click on your home page. Once the Remote Site is set up any time changes are made to the local site you Put your files to the Remote site by clicking the blue arrow in the Files panel. If you need to get files from the server use the Green arrow. If you are using Check in and Check out, when you Check out files use the green arrow with the check mark.

When you finish, Check in using the Blue arrow with the lock symbol. In the files panel all of the files that have been put are now marked with a lock symbol and as you open the pages to work on them, the lock changes to a green check. Employees of UF have web space access on the Plaza Server. For help or information see the following page or go to http://help.gatorlink.ufl.edu/webserv.html . Your web space address would be http://plaza.ufl.edu/your_username. You place your information on the server using FTP services.