Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Using Variables in Hypertext Links

The URL and Description for external hypertext links supports variables. This allows the target file of a hypertext link to have the target file controlled by a variable.

An example of why a variable would be used in a hypertext link.

Software often has a version number which is made up of several parts, known as the "major", "minor" and "revision" numbers. For example, the current build of Author-it is 4.5.610 which is broken into three parts:

  • Major = 4
  • Minor = 5
  • Revision = 610

This version number is used in many places on our website (i.e. displaying the current version number and linking to the latest update file). The update files that you (as our users) download use the revision number as part of the file name (for example, the latest update is called Update610.exe).

Set up variables.

In this case, add four variables through the administrator, as follows:

Variable

Default Value

<AIT_MAJOR>

4

<AIT_MINOR>

5

<AIT_REVISION>

610

<AIT_BUILD>

<AIT_MAJOR>.<AIT_MINOR>.<AIT_REVISION>

None of these variables need an assignment anywhere in the library as they are being set globally by the administrator.

Note: The variable <AIT_BUILD> is created from the other three variables, and in this case will resolve to 4.5.610

The Hypertext Link Objects

Within the "Get latest Update" hypertext link object (which is set up as an internet URLs) inserted variables into the URL and Description fields:

URL = http://www.author-it.com/xxx/update<REVISION>.exe
Description = Update to version <AIT_BUILD>

When publishing, the URL will resolve the target file as "update610.exe" and the hypertext link description as "Update to version 4.5.610"

When the next build is released, the only change needed is to the <AIT_REVISION> default value in the administrator.

See Also

Working With Variables

Variable Types

Listing Variables

Variable Usage

Variable Assignments

Using Variables in Topics

Using Variables in External Files and Templates

Adding a Variable Assignment

Assigning Website Manager Variables

Viewing Usage in Topic Objects

Viewing Assignments in Objects

Where You Might Use Variables

Top of Page Email this Page Log Support Call Send Feedback Print