- Examining the Family/Personal Template
- Customizing the Template
- Customizing the Family Pictures Page
- Publishing Your Family/Personal Website
- Summary
Publishing Your Family/Personal Website
At this point you have customized the web pages for the family/personal template, but these web pages still reside on your local computer, and are not accessible to others via the Internet. As discussed in Chapter 2, "Creating a Website," these files must be placed on a computer that has a dedicated connection to the Internet. Recall that there are a couple of steps you must go through to secure a public Internet website. Assuming you have completed these steps, publishing your Composer-created web pages is a breeze.
Awesome Personal Journal
A great way to share vacation memories is to put your journal on your website. It doesn't have to be complicated. Just set up an index page and add entries as individual pages as you write them. Paul McFedries (one of Sams's authors) created a journal from his trip to Italy. The entries are fun to read and filled with pictures from his visit. He incorporated links to other entries or to whatever he was writing about for further informationa nice touch. This is a great site to study if you're looking for examples of good writing. Anyone can put vacation pictures on their website and tell friends what they did each day. But Paul's writing makes you feel like you're reading an insider's guide to Italy. His site is fun to read even if you don't know him.
Website Review
To publish a particular page, go to the File menu and choose Publish. This will display the Publish Page dialog box, which contains two tabs: Publish and Settings. As discussed in Chapter 2, the Settings tab allows you to specify information about the FTP server for the website as well as username and password information for the FTP server. You'll need to enter the FTP information provided by your web hosting provider in the Settings tab.
Once you have filled out the Settings tab, go to the Publish tab, which is shown in Figure 3.10. The Publish tab allows you to customize how the web page is published on the server. The default settings shown in Figure 3.10 are typically sufficient. To publish the web page, simply click the Publish button.
Figure 3.10 The Publish Page dialog box is used for publishing a web page to a public web server.
If the page is published successfully, you should see a dialog box like the one shown in Figure 3.11. This dialog box indicates the success or failure of publishing the web page and any associated files.
Figure 3.11 The index.html page has been published successfully!
Note that the dialog box in Figure 3.11 shows that two files have been uploaded to the web serverindex.html and LongHair-Chewing.jpeg. What about the other web pages, such as pictures.html, events.html, and recipes.html? Those need to be uploaded too.
Unfortunately, with Composer you have to manually publish each of these files separately. That is, you need to open each file to publish in Composer, go to the File menu, and choose the Publish menu option.
NOTE
Notice that when you publish a file to the web server, any image files in the web page are automatically published as well. For example, when the home page, index.html, is published, two files are uploaded to the web server: index.html and LongHair-Chewing.jpeg. The LongHair-Chewing.jpeg is the image file of Sam that is in the upper-left corner of the home page.
Placing Linked Files in the Same Folder
Throughout this chapter when adding hyperlinks to other web pages or image files, I have stressed the importance of placing the web pages or image files being linked to in the same folder as the page you are currently working on. If you do not do this, when a user visiting your site clicks on the link, they will not be taken to the desired page. Rather, they will see an error message informing them that the file requested could not be found.
Additionally, underneath the filename in the Link Properties dialog box there is an option called URL is relative to page location. When adding a link, this check box should be checked. After choosing a file by clicking the Choose File button, if the check box is unchecked, the text that appears in the drop-down list will look like file://pathToTheFile/FileName. If the check box is checked, the text in the drop-down list will have just the filename, and not the file://pathToTheFile/ prepended.
It is important that the file://pathToTheFile/ text does not appear before the file name. If it does, either uncheck the URL is relative to page location option, which will get rid of the offending text, or simply click on the text and delete the offending text manually.
You may be wondering why it is so important to have the URL is relative to page location check box checked. If you leave this unchecked, or leave in the file://pathToTheFile/ text, when the web page is published to the publicly available web server, these hyperlinks that were not successfully created will render as broken links in your visitor's web browsers.
"Be sure to check the URL is relative to page location check box for each hyperlink you create, and your hyperlinks will work properly for all web visitors."
A broken link is a hyperlink that, when clicked, displays an error informing the user that the web page cannot be found. The reason this error occurs is because for links created without URL is relative to page location checked, the hyperlink's URL is published as file://pathToTheFile/FileName, which is the path and filename on your desktop computer. When a user clicks this link, their web browser will see the file:// and will attempt to locate a file on their computer's hard drive located in the specified path and with the specified filename. This file will likely not exist on their computer, and, hence, they will get an error message informing them the file could not be found.
What is important to realize is that since the file exists on your computer, if you are testing your website from your computer, these links will render fine because you have these files on your computer! However, others will not be able to navigate through your website via these improperly created hyperlinks.
The short of it is, just be sure to check the URL is relative to page location check box for each hyperlink you create, and your hyperlinks will work properly for all web visitors.
Testing the Website
After you have published each web page for the family/personal website, take a moment to check out your website through a web browser. Launch your web browser and enter the URL to your websitein doing so you should see your family/personal website's home page.
Click around on the hyperlinks and make sure all pages are accessible. If you get an error message when clicking on a hyperlink chances are the error is due to one of the following two causes:
First, the error might have occurred because you forgot to publish the web page that the hyperlink was pointing to. Remember that every web page that you created with Composer must be published to the public website. So make sure that the web page you are having trouble accessing was, indeed, published (and published successfully).
If you are certain that the web page you are requesting has indeed been published, then the error might be due to a broken link. That is, the hyperlink you clicked on is directing the user to a URL of a web page that does not exist. This could be due to having created a hyperlink to an existing file, but then later changing the filename and not updating the hyperlink's URL. Also, it might be due to not having checked the URL is relative to page location check box in the Link Properties dialog box.
In either case, you'll need to reopen the web page that contains the offending link, fix the link problem, and republish the page.