Do you remember the first Web pages you browsed? They were long, long pages of text, either flush left or (yuck) centered, going on and on and on. The Web has come a long way since then. A single-page Web site is no longer common, and endlessly-scrolling pages are no longer cool.
Nowadays we don't post Web pages, but publish Web sites -- sites full of pages -- which means sites full of links. And all of these links mean sites full of potential errors, such as links that don't point to the correct pages, links that don't connect to images.
Fortunately, as well as being a powerful tool for Web page design, GoLive is great for site management, too. It's a tool for collecting all of your site's files to ensure they all make it to the server and save you the embarrassment of error pages or missing file icons. Plus GoLive is great for collecting links to places outside of your site, as well as making sure your external links are valid. GoLive shows you what links where, what's used where, and whether you've got any errors.
GoLive's link management abilities are definitely one of the strengths it brings to the site management table. Here's how they work.
As you work on your site -- adding pages, images, and other files -- you've got full flexibilty to reorganize your files. Each time you move a file from one location to another, all of the links to it need to be updated so that the file can be found and used. This can get quite messy is the file is oft-used. But GoLive watches and asks your permission to update all pages that contain that file. Just say OK and all affected links are updated for you.
In this example, a file is being moved into a new folder (directory). After this move, one might rename
index.html. Again, GoLive would update the links. And your end result would be a shorter, easier-to-type URL for your users. (You can click on the screen shots below -- and throughout this article -- to open full-size views.)
Ever wonder how many links you have to any particular page? The Used column right there in the Files tab reports this at a glance.
It's a bit hidden by default. Expand the Used column and you'll see it.
This is not a count of pages it's used on, but of total links. If one page is linked to twice on one page, that's two uses.
As you work, GoLive constantly checks the validity of the links on your pages. One way you can see this is in the Status column of the Files tab; another is directly within the page. Whenever your page is open, you can click the Link Warnings button on the toolbar and GoLive will highlight any errors. Below, you can see a page that reported a bug in the Files tab. Open, it reveals two bad links. With the I-beam in the first bad link, you can see in the Inspector that the URL is missing.
One of the most commonly requests in HTML forums is for a tool that checks the validity of links to outside sites. But you don't read much discussion about this in the GoLive forums, because GoLive users have long had a tool to check external links.
You spend most of your time working from GoLive's Files tab. Right next door, the External tab is waiting to track and verify your external links any time you'd like. It starts out empty. After you create some links leading out of your site, switch to this External tab. Whenever you're there, you'll have an option to Get Referenced Used, from either the Site menu or contextually. Upon choosing that option, GoLive culls through all of the pages in your Files tab and lists them as URL or Email References, one per external address.
Any time you're online, you can ask GoLive to check the validity of those links. Just switch to the External tab, and choose Check External Links from either the Site menu or the contextual menu.
In the Status column, you'll see double arrows for each address as GoLive searches the Web for each. Then there will be a checkmark if it's OK, or a bug if the link is not valid. If a folder is closed but holds multiple pages, a mini-bug or mini-checkmark shows you the state of the pages within.
(Also notice that GoLive tells you how many times eash address is linked to.)
Note about link creation
Once you know that a link is bad, and then figure out the correct URL, you can repair it without opening the page it's on. To fix any link, just click its icon once, then retype (or paste) the new URL into the Inspector. (The Inspector is called the Reference Inspector here.) This will update that URL on every page that contains it. Of course, GoLive doesn't update anything without your permission, so it asks you first, clearly reporting the proposed update. Since you can clearly see whether a URL is used or not, if it's not used and it's bad, you can simply delete it from here by selecting it and clicking the Delete (trash can) icon on the toolbar.
Sometimes, it can help you to know which page or pages actually contain the bad URL. Enter the In & Out Links palette, which I conveniently introduce you to here as well.
The more you add to your site and the longer it's live, the harder it becomes to recall where you've used an image or file, or whether you've even used it at all. This is not a problem with GoLive. Just click a page in the Site Window, and you see all pages that link to the page and all links out of it. (You can even change those pages and files by Point and Shooting to any new file.)
The secret is the In & Out Links palette. To open it, click its button in the toolbar or choose Window>In & Out Links.
Want to know which pages link to a particular page? Select that page from the Files tab and look in the In & Out Links palette. All pages that lead visitors to the page appear at its left.
Want to know which pages link out of a particular page? Again, select that page in the Files tab and look in the In & Out Links palette. All pages that the selected page leads to are appear at its right, coming out of that page. Actually, it's not just linked-to pages that appear there. All items that are linked to from that page are shown. For example, if a QuickTime video is a part of that page, that video appears there. If you used a background image on that page, it's there too. The entire page's linked-in contents are reported there. Unless that's too much information for you, that is.
Below, you can see a partial listing for my own site's home page. When seeking specific types of info, you can choose what you do or don't see as links. Choose Palette Options from the palette's flyout menu, then check only those links you'd like to see.
The In & Out Links palette isn't only for viewing pages. If you select an image (or sound) file, you can see all pages on which that file is used. (They appear on the left/right.)
The In & Out Links palette also shows you link usage. Select any Reference in the External tab and it shows you all pages on which that Reference is used. (Which is helpful when an external link is no longer valid.)
Here (below), you see a Reference that is not used. It's either been unlinked and is left over, or it was placed there for future use but was never needed.
Here (below), you see a bad link that is used once. In order to determine the significance of it, which can then help determine a replacement destination, the Reference is viewed and the using-page is discovered. The user can now open that page from the Files tab.
The In & Out Links palette goes beyond reporting links. It enables you to alter the link destinations.
When you're out to swap any one particular file with another, another way you can do this is to change all links to references. To do this, choose Site>Change References or the Change All References button on the toolbar. (Both are available whenever the Site Window is active.) Then Point and Shoot to the old file and the new one, as shown here.
Or, if you begin with the file to be changed selected, you only need to Point and Shoot to the new file.
Another way to see which pages link in and out of a page is within Navigation view. To get there, choose Diagram>Navigation, then the Links tab. Here, there are several ways to view your site's hierarchy. Again, you can filter out various files. You can also choose whether you see file names or page names, generic icons, thumbnails, etc. In this view, double-clicking a page opens that page. You can also see unlinked pages and much more, within the various panes that are not shown here.
Also in the Navigation view is the Navigation tab, which shows the overall hierarchy of the site, rather than actual links.
Yet one more way to see what's what in your site is to check for missing or Orphaned files.
An Orphan is a file that's elsewhere on your hard drive or mounted disk, but not in the GoLive Site Window. Since an Orphan file is still on your hard drive, it's accessible and therefore still shows up on your page as you work. But since it's not in the Files tab, it won't make it to the server and your users won't see it. To see Orphans, click the double-headed arrow at the lower right of the Site Window when in the Files tab. Then click the Errors tab in that now-unhidden side of the Site Window. If you have any orphans, they'll appear within a folder called Orphans. If you don't, you won't see this folder.
It's easy to fix the problem. Just drag the Orphaned file over to the Files tab, dropping it anywhere you'd like, as is shown here. GoLive asks you to allow the update, and copies the file into the site. That Orphan then goes away.
A Missing file is more of a problem, as GoLive cannot find this file anywhere on your hard drive (or other mounted volumes) and therefore cannot work with it at all. It's more evident, as it doesn't appear on that page (presenting a generic icon instead), but it also appears in the Errors tab in a Missing Files folder. The only way to fix this issue is to find the file yourself and add it to the Files tab. (GoLive's great at tracking things but its powers don't include the psychic yet.)
GoLive also has another feature, called Components, that can can also help you greatly by enabling you to create one set of links, and then use them on multiple pages. But that's another story.
Deborah Shadovitz is a Mac user-turned-specialist, who also designs Web sites. Among other things she teaches and writes about GoLive.
Return to the Web Development DevCenter.
Copyright © 2009 O'Reilly Media, Inc.