Web DevCenter    
 Published on Web DevCenter (http://www.oreillynet.com/javascript/)
 See this if you're having trouble printing code examples


Link Management with Adobe GoLive

by Deborah Shadovitz
07/12/2002

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.

Automatic Link Updating

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 saying.html to 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.)

Click for larger view

Click for larger view

Page Use Count

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.

Click for larger view

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.

Internal Links Validity Check

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.

Click for larger view

External Links Validity Check

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.

Click for larger view

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
If you have created two separate links to the same exact address GoLive 6* recognizes they're the same and creates just one external object. If you create two separate links to the same address but with, say, an ending slash on one but not on the other, GoLive will see two different addresses and create two different objects. (You don't want that.) The best way to link to an address a second time is to set the destination by Pointing and Shooting to its Reference in the External tab.

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 In & Out Links Palette

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.

Page Use

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.

Tip
You can organize your external link References into folders anyway you'd like.

  1. When in the External tab, choose New Folder from the Contextual menu or drag a New URL Group or Address Group icon from the Objects palette.
  2. Name the folder.
  3. Move your References into the folders.

Page File Contents

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.

Click for larger view

Click for larger view


Media File Use

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.)

External Link Use

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.

Click for larger view

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.

Click for larger view

Link Changes

Related Reading

Dreamweaver in a Nutshell
A Desktop Quick Reference
By Heather Williamson, Bruce A. Epstein

The In & Out Links palette goes beyond reporting links. It enables you to alter the link destinations.

For example:

Another Way to Do Link Changes

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.

Click for larger view

Or, if you begin with the file to be changed selected, you only need to Point and Shoot to the new file.

Navigation View

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.

Click for larger view

Also in the Navigation view is the Navigation tab, which shows the overall hierarchy of the site, rather than actual links.

Click for larger view

Missing & Orphaned Files

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.

Click for larger view

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.)

Components

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.

And thus ends our link management tour...

but if you're new to GoLive or now have a newly-gained appreciation for some of what it can do, this is far from any "the end".

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.