Links
Sage offers tags for defining links to various kinds of resources:
- Sage content (here tags, sections, articles, topics, and volumes), using the [link] tag.
- Arbitrary URLs (http, https, ftp, etc), using the [url] tag.
- Guru articles, using the [guru] tag.
- Code Vault (both the web and graphical interfaces), using the [cvweb] and [cvgui] tags.
- Files stored in a location available to the web server, using the [file] tag.
To link to Sage content,
use the [link] or [link/] tags.
These tags are similar, except that the [link] tag
allows you to specify the link's caption (what the user sees),
while the [link/] tag makes the caption automatically
(based on the link target).
The following tables provide a quick reference for
composing Sage links…
This table shows how to link to Articles, Topics, and Volumes…
Link To | Pattern |
---|---|
Top of Current Article | # |
Another Article | Article |
Article in Another Volume | /Volume/Article |
Topic in Same Volume | Topic |
Topic in Another Volume | /Volume/Topic |
The Current Volume | / |
Another Volume | /Volume |
This table shows how to link to a specific Section
in an Article…
Link To | Pattern |
---|---|
Section in Same Article | #Section |
Section in Another Article | Article#Section |
Section in Article in Another Volume | /Volume/Article#Section |
This table shows how to link to a specific Section
in a Topic or Volume that has an Overview Article
(an Article with a name or alias of Overview)…
These are discussed in more detail in the following section.
Link To | Pattern |
---|---|
Section in Topic in Same Volume | Topic#Section |
Section in Topic in Another Volume | /Volume/Topic#Section |
Section in The Current Volume | /#Section |
Section in Another Volume | /Volume#Section |
The body of this link is a Sage link target, specifying a here tag,
section, article, topic, or volume.
The link caption goes between the [link] and
[end] tags,
and can include just about any markup
(though it would be superfluous to use underlined text,
as link captions are automatically underlined).
The format of the tag body depends on the type of Sage entity
you are linking to. To link to…
- A section (or here tag) in the same article, specify the title or alias, with a pound sign in front, as in: [link #SqlKeywords]SQL Keywords[end] The above example links to the section with title or alias of "SqlKeywords" (or to a here tag with the alias "SqlKeywords"). The link caption is "SQL Keywords".
- A section (or here tag) in another article in the same volume, specify the article and section/here tag (separated by a pound sign): [link Syntax#SqlKeywords]SQL Keywords[end] The above example links to the article with title or alias of "Syntax" (in the same volume), and in that article, to the section with title or alias of "SqlKeywords" (or to a here tag with the alias "SqlKeywords"). The link caption is "SQL Keywords".
- A section (or here tag) in an article residing in a different volume, start with a forward slash, then separate the volume from the article with another forward slash, and separate the article from the section/here tag with a pound sign: [link /VDB/Syntax#SqlKeywords]SQL Keywords[end] The above example links to the article with title or alias of "Syntax" (in the volume with title or alias of "VDB"), and in that article, to the section with title or alias of "SqlKeywords" (or to a here tag with the alias "SqlKeywords"). The link caption is "SQL Keywords".
- Another article in the same volume, specify the article title or alias. For example: [link Syntax]SQL Keywords[end] The above example links to (the start of) the article with title or alias of "Syntax" (in the same volume). The link caption is "SQL Keywords".
- A topic in the same volume, specify the topic title or alias. For example: [link Syntax]VDB Syntax[end] The above example links to the topic with title or alias of "Syntax" (in the same volume). The link caption is "VDB Syntax".
- A topic in another volume, start with a forward slash, then specify the volume title or alias, then another forward slash, and finally, the topic title or alias, followed by a forward slash. For example: [link /VDB/Syntax]VDB Syntax[end] The above example links to the topic with title or alias of "Syntax", in the volume with title or alias of "VDB". The link caption is "VDB Syntax".
- The current volume, use the target "/". For example: [link /]VDB Library[end] The above example links to the current volume. The link caption is "VDB Library".
- Another volume, start with a forward slash, then specify the volume title or alias. For example: [link /VDB]VDB Library[end] The above example links to the volume with title or alias of "VDB". The link caption is "VDB Library".
This tag is similar to the [link] tag,
except that you do not specify a link caption
(and this tag does not have a corresponding
[end] tag.
Sage determines the link's caption based on the
target.
For example, if you link to a section (whether
in the same article, different article in the same
volume, or an article in another volume),
Sage uses the section title or alias
(whichever you specify in the link) as the caption.
Naturally, if the caption that Sage formulates is
inadequate, simply use the
[link] tag instead.
These are like the
[link] tag and the
[link/] tag,
except that [mlink] and
[mlink/] automatically use the monospace
font (as if they were enclosed in backticks).
These tags are especially handy when linking to
units, types, methods, or routines (when discussing
a programming language or library).
These are like the
[link] tag and the
[link/] tag,
with an additional twist:
if article A links to article B
using [ref] or [ref/],
then article B will include an automatically-generated
link back to article A (at the end of article B).
In effect, these tags generate an automatic "See Also"
section at the end of an article.
For example, the MiniCalc Reference
volume uses these tags to group MiniCalc functions
into logical categories.
Sage generates a list at the end of each function's article,
with links back to the categories that the function belongs to.
Specifically, here
is an article with [ref] links to all of the
MiniCalc global functions related to iterators.
Then, for example, the article for the function
@Join ends with a list of the categories
that this function belongs to.
These are like the
[ref] tag and the
[ref/] tag,
except that [mref] and
[mref/] automatically use the monospace
font (as if they were enclosed in backticks).
These tags are related to the
[ref],
[ref/],
[mref],
and [mref/] tags.
By default, the link's title is simply the article's title.
However, the [RefTitle] and [RefTitle/]
tags allow you to specify a different title.
These tags may appear anywhere inside an article,
and they only affect the title of the back-link
that the Sage web app automatically generates.
Use the [RefTitle/] tag
when the title does not need any formatting…
[article Math]
[RefTitle/ Math Functions]
[//] article content, including some [ref] tags
[end]
On the other hand, if the title needs formatting,
use [RefTitle] instead…
[article Advanced Math aka AdvancedMath]
[RefTitle]/Advanced/ Math Functions[end]
[//] article content, including some [ref] tags
[end]
Above, any articles referenced via [ref] tags
will link back to this article, but those links will
render the word "Advanced" in italics.
The [title/] tag is usable in
[link] and [mlink] tags,
and expands to the caption of the referenced item.
For example…
[section Database Introduction aka DBIntro]
...
[end]
...
See the [link #DBIntro][title/][end] for details.
Above, the link's caption will be "Database Introduction"
(as opposed to "DBIntro", which is what a [link/]
tag would yield).
This feature allows you to link to an item,
displaying the full title, without repeating the title.
For a second example, here's a link to the current
section, using a [title/] tag:
The [title/] Tag.
You can view this article's source
to get a clearer picture.
The [title/] tag is only allowed in
[link] and [mlink] tags.
The [url] and [url/] tags allow you to
link to URLs from other websites.
For example…
This library uses
[url https://en.wikipedia.org/wiki/Coroutine]coroutines[end].
The above produces this output…
If you want the link's caption to simply be the URL,
use the [url/] tag, which does not have
a corresponding [end] tag.
For example…
For more information about coroutines:
[url/ https://en.wikipedia.org/wiki/Coroutine].
The above produces this output…
This way, you don't have to repeat the URL.
Sage allows long URLs to span multiple lines.
For example, instead of…
See [url/ https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_VCL_TControlList_Control#The_new_TControlListButton_component]
for details.
The above can be formatted as…
See [url/ https://docwiki.embarcadero.com/RADStudio/
Alexandria/en/Using_VCL_TControlList_Control#
The_new_TControlListButton_component]
for details.
In [url] tags,
Sage strips out line breaks, and leading spaces on each line.
The [guru] and [guru/] tags allow you to
link to Guru articles.
For example…
Recall that we are deprecating
[guru 34447]some columns[end]
in the `cntrl_date` and `batch_cntrl_date` tables.
The above produces this output…
If you want the link's caption to simply be the article number,
use the [guru/] tag, which does not have
a corresponding [end] tag.
For example…
For details on deprecated columns
in the `cntrl_date` and `batch_cntrl_date` tables:
[guru/ 34447].
The above produces this output…
For details on deprecated columns in the cntrl_date and batch_cntrl_date tables, please see Guru #34447.
For details on deprecated columns in the cntrl_date and batch_cntrl_date tables, please see Guru #34447.
Instead of specifying an article ID,
you may specify an article
Alias.
For example…
Guru's [guru SearchExprs]search expression[end] syntax
offers many advanced features.
The above produces this output…
If you want the link's caption to simply be the article alias,
use the [guru/] tag, which does not have
a corresponding [end] tag.
For example…
See [guru/ SearchExprs] for more information
on the syntax of search expressions.
The above produces this output…
The [cvweb] and [cvweb/] tags allow you to
link to pages on the
Code Vault
website.
For example…
Remember to edit
[cvweb $/Departments/Dimeric/Houston/Production/Houston.ini?LinkID=2358418]
Houston.ini[end] when making a new 3-tier or web application.
The above produces this output…
If you want the link's caption to simply be the Code Vault URL,
use the [cvweb/] tag, which does not have
a corresponding [end] tag.
For example…
Remember to edit Houston.ini, in the folder
[cvweb/ $/Departments/Dimeric/Houston/Production/],
when making a new 3-tier or web application.
The above produces this output…
Remember to edit Houston.ini, in the folder $/Departments/Dimeric/Houston/Production/, when making a new 3-tier or web application.
Remember to edit Houston.ini, in the folder $/Departments/Dimeric/Houston/Production/, when making a new 3-tier or web application.
The [cvgui] and [cvgui/] tags allow you to
link to content in the Code Vault Windows client.
For example…
We recently enhanced tree grids
to support common clipboard operations
([cvgui Production.JSON/ReviewRev/455768]full details[end]).
The above produces this output…
If you want the link's caption to simply be the Code Vault URL,
use the [cvgui/] tag, which does not have
a corresponding [end] tag.
For example…
We recently enhanced tree grids
to support common clipboard operations
(full details: [cvgui/ Production.JSON/ReviewRev/455768]).
The above produces this output…
We recently enhanced tree grids to support common clipboard operations (full details: Production.JSON/ReviewRev/455768).
We recently enhanced tree grids to support common clipboard operations (full details: Production.JSON/ReviewRev/455768).
The [file] and [file/] tags allow you to
link to files reachable by the SageWeb server.
Typically, these files will reside on a network file server,
such as DS-Files or DataServer,
or even files stored in CodeVault.
For example…
The training session was recorded, and can be viewed
[file \\DataServer\Enterprise\Delphi\Training\Branchless Programming\
Branchless Programming.mp4]here[end].
The above produces this output…
If you want the link's caption to simply be the file name,
use the [file/] tag, which does not have
a corresponding [end] tag.
For example…
The training session was recorded:
[file/ \\DataServer\Enterprise\Delphi\Training\Branchless Programming\
Branchless Programming.mp4].
The above produces this output…
The training session was recorded: \\DataServer\Enterprise\Delphi\Training\Branchless Programming\Branchless Programming.mp4.
This way, you don't have to repeat the file name.
The training session was recorded: \\DataServer\Enterprise\Delphi\Training\Branchless Programming\Branchless Programming.mp4.
The [file] tag has built-in support
for Code Vault files: simply specify the file using
Code Vault's notation (starting with the root, $,
using forward slashes as the path separator).
For example…
[file $/Tools/Images/crystal_project/128x128/apps/babelfish.png]babel fish[end]
The above produces this output…
In DSEdit, use the Code Insight feature
(⇧ Shift+^ Ctrl+Space) to see suggestions for completing
file names (local, remote, or Code Vault).
Sage allows long file names to span multiple lines.
For example, instead of…
The training session was recorded:
[file/ \\DataServer\Enterprise\Delphi\Training\Branchless Programming\Branchless Programming.mp4].
The above can be formatted as…
The training session was recorded:
[file/ \\DataServer\Enterprise\Delphi\Training\
Branchless Programming\Branchless Programming.mp4].
In a [file] tag,
Sage strips out line breaks, and leading spaces on each line.
When SageWeb serves up a file, it doesn't use the HTTP
Content-Disposition
header, at least not by default.
This header indicates whether the file should be viewed inline,
or downloaded as an attachment.
Sage offers the download and file attributes
for controlling this header…
If the [file] tag does not include the download
attribute, SageWeb will not generate a Content-Disposition header.
If download attribute is present,
SageWeb will not generate a Content-Disposition header,
according to the above table.
Note that [file download file="filename.txt"]
is short for [file download=yes file="filename.txt"].
When using the download attribute,
you should specify the filename with the file attribute.
Additionally, file names that contain an equals sign
must be quoted (in addition to filenames that contain quotes
or close square brackets).
The both attribute generates two links:
one to download the file, and another to view it inline.
For example…
[file download=both file="\\DataServer\Enterprise\Delphi\
Training\Branchless Programming\
Branchless Programming.mp4"]Branchless Programming[end].
The above produces this output…
This is merely a convenience:
without it, we would need two [file] tags,
each one specifying the full file name.
Sage Download Attribute | HTTL Content-Disposition |
---|---|
none | none |
yes or blank | attachment |
no | inline |
both | attachment and inline (two links) |
DSEdit's
Code Insight for Sage
files offers suggestions for
[link] and [mlink] tags.
For example…
⏱ Last Modified: 10/24 9:45:52 am