An external link lets you search for a file (e.g., HTM, HTML, XML, PDF, Microsoft Office files) outside your project. These steps involve a little planning ahead. You need to know the location where your files will be published, as well as the names of your main output files.
- Open the
content file (e.g., topic, snippet)where you want to insert the link.
- Use the normal steps for inserting the type of navigation link that you want to create:
- From the Link to drop-down field, select External File.
In the field to the right, next to the External File button, enter the path for the link, depending on the output type you are using.note
Note: Because the link usually needs to be relative, based on the final locations of your output files, it is preferable to enter the text directly into the field, rather than clicking the External File button.if you are building microsoft html help (chm files)
Use one of the following:
Use the first method if you plan to publish your CHM files to the same folder (recommended). Use the second method if you plan to publish your CHM files in different folders.
Let's say you have a project called "FirstHelp" and another called "SecondHelp." Also, let's assume that the first project will generate a CHM file named "First.chm," and the second will generate a CHM file named "Second.chm." (The names of the CHM files can be specified on the General tab of the Target Editor. Enter the desired name in the Output File field. If you plan to publish the files to the same folder, they need to have different names.)
Suppose you want to create a text hyperlink in a topic called "Welcome," which is located within the FirstHelp project. When a user clicks on this link, you want it to open a topic called "About the Company," which is located within the SecondHelp project. Therefore, you open the Welcome topic in the FirstHelp project. Then you highlight the text to be used in the hyperlink, and you select Insert > Hyperlink. The Insert Hyperlink dialog opens. Next, from the drop-down field you select External File. What do you enter in the External File field?
We will take a look at two different situations. First, let's say that you plan to publish both CHM files to the same folder (perhaps on your company's intranet). In that case, you would enter the following:
SecondHelp.chm::/About the Company.htm
On the other hand, let's say that you plan to publish First.chm to one folder, and you plan to publish Second.chm to a separate folder, such as the following: C:\Documentation\More Help. In that case, you would enter the following:
mk:@MSITStore:C:\Documentation\More Help\SecondHelp.chm::/About the Company.htm
Note: If you want to link content to an external CHM file, an alternative is to use the "HTML Help File" option from the "Link to" field, instead of the "External File" option.if you are building other output types
Enter the relative path from the source output topic to the destination topic, using a pair of periods to represent each folder level.
Let's say that you have a project called "First Help" and another called "Second Help." Suppose that you will generate WebHelp output for the First Help project and publish it to a folder called "MyFirstHelp." You will also generate WebHelp output for the Second Help project and publish it to a folder called "MySecondHelp," which is located next to the "MyFirstHelp" folder. Now, let's say you have a topic called "Welcome" in the First Help project and it is stored at the root level of the Content folder. You want to create an external link in this topic so that it opens a topic called "About the Company," which is stored in the root Content folder of the Second Help project. In that case, you would enter the following when creating the external link:
../../MySecondHelp/Content/About the Company.htm
- (Optional) You can click to display and select any bookmarks within the destination file, or if you have selected a PDF file. See Inserting Bookmarks and Creating Named Destinations.
- In the link dialog, click OK.
- Click to save your work.
- Generate the output for the projects and publish the files to the appropriate location(s).
Note: With Mark of the web enabled in your target, some links to external files may not work properly in some versions of Internet Explorer when pages are viewed locally (file://). This is not an issue if pages are viewed online (http://). For more information about MOTW, see Microsoft's MSDN website.
Note: The Eclipse Viewer cannot display PDFs opened from links.