One of the program's most powerful features is the ability to insert a link to any file or site, into any of its document. With the document open in edit mode, or in other modes such as delivering a presentation, you can click the link to go to the file or site. You can insert links not only in HTML documents but in Writer, Calc, Impress, and any other documents where the hyperlink bar is available. To unlink items, see Unlinking on page 478. This section covers the following topics:
How the Hyperlink Toolbar Icons WorkThe three different URL fields, and all sorts of Link and Hyperlink icons, make it a little hard to figure out what kinds of links you can do with each of the parts of the work area. Figure 16-1 points out the key differences among the link- related features, for inserting hyperlinked text and buttons (inserting graphics that you can hyperlink is covered later in this section). Figure 16-1. Getting to know the link tools
Setting Relative or Absolute URL Save OptionsThe Save options window contains two fields that control how URLs are saved: relative to the file system or Internet, or absolute. See Absolute and Relative Paths, and Fixing Broken Links on page 138 to specify how you want URLs saved. Note Tool tips always display the absolute path, even if only the relative path is saved. In HTML files, you can choose View > HTML Source to see what's really in the link. Linking to a File, Web Site, FTP Site, or EventThe Hyperlink window lets you create links not only to Web sites and files, but to items such as new email or news documents and scripts. It also lets you set up names for the links, so you can reference those links in scripts. This procedure provides an overview; more advanced features such as linking to a macro are covered in other sections in this and other Web chapters. The window is shown in Figure 16-2; steps follow it.
Figure 16-2. Adding a hyperlink:
Note To change the link later, you can't select it and click the Hyperlink Dialog icon again. You need to select it and choose Edit > Hyperlink. Linking to TargetsTargets are points within your document that you can specifically link to; for example, you might want to set up a short table of contents at the beginning of the document, and link each line to a particular heading within the document. You can also link to specific objects (these vary depending on the application you're using). This is particularly useful for going to a specific paragraph within a long document. Linking to a Heading or Object Within a DocumentThis works with Web, Writer, and Calc documents, but not Impress, Draw, or Image. In Calc you can link to other sheets, and to range names and database ranges. Note The heading-linking feature is extremely inconsistent; if you find that clicking on your hyperlink takes you absolutely nowhere, you'll need to do it in the HTML. So don't beat your head against this feature too long. We've covered that in the next procedure, Linking to a Target Within a Document on page 473.
Note To name graphics and tables so you can tell which one to select in Navigator, right-click and choose Graphics or Table. Enter a name in the Graphics or Table tab. Linking to a Target Within a DocumentThe Hyperlink window doesn't let you link to any text that doesn't have a heading style in the range Heading 1 through Heading 5 applied to it. It also frequently falls flat when you try to link to headings. We've provided instructions on how to do it the old-fashioned way in HTML. (HTML novices, this is extremely easy.) Creating the Target, Using HTML
Linking to the Target You Created Using HTML
Linking to a New Email or News DocumentThe Hyperlink window lets you create links not only to Web sites and files, but to items such as new email or news documents and scripts. It also lets you set up names for the links, so you can reference those links in scripts. Note More advanced features such as linking to a macro are covered later.
Linking to a New Empty FileThis feature opens a new empty file of the type you specify when the hyperlink is clicked.
Adding Hyperlinks to GraphicsThis procedure describes how to add a hyperlink to a graphic you've already inserted. Note This works only with graphics added using Insert > Graphic, not pasted graphics.
UnlinkingTo unlink a graphic, just open the Graphics window again (right-click and choose Graphics), then click the Graphics tab, delete the URL and click OK. To unlink a text or button hyperlink, deleting the URL doesn't work. To unlink any text, button, or graphic, select and choose Format > Default. Viewing and Editing Links in a DocumentTo change existing links, or see exactly what the link is, you have several options. You can edit the HTML source code, of course. The rest of the options are covered here. Using the Hyperlink WindowJust select the item and open the Hyperlink window again (click the Hyperlink Dialog icon) to make changes. Unlinking a Text LinkSelect it and choose Format > Default. Quickly Changing a Text or Button LinkSelect a text or button link in the window, change the URL in the Internet URL field, then click the Hyperlink icon on the hyperlink toolbar or press Enter. Editing an Individual Text LinkSelect a link and choose Edit > Hyperlink. Curiously, this works only for text links created using the Internet URLs or Hyperlink window, not for button links created using that window, or for any graphics links. |