Class
CallToAction
A directive that adds a prominent button or link to a page’s header.
final class CallToAction
Discussion
A “Call to Action” has two main components: a link or file path, and the link text to display.
The link path can be specified in one of two ways:
The url parameter specifies a URL that will be used verbatim. Use this when you’re linking to an external page or externally-hosted file.
The path parameter specifies the path to a file hosted within your documentation catalog. Use this if you’re linking to a downloadable file that you’re managing alongside your articles and tutorials.
The link text can also be specified in one of two ways:
@CallToAction requires one of url or path, and one of purpose or label. Specifying both purpose and label is allowed, but the label will override the default label provided by purpose.
This directive is only valid within a Metadata directive:
@Metadata {
@CallToAction(url: "https://example.com/sample.zip", purpose: download)
}
Topics
Instance Properties
Instance Methods
Type Properties
Enumerations