| java.lang.Object | ||||
| ↳ | com.atlassian.renderer.links.Link | |||
| ↳ | com.atlassian.renderer.links.BaseLink | |||
| ↳ | com.atlassian.confluence.links.linktypes.AbstractContentEntityLink | |||
| ↳ | com.atlassian.confluence.links.linktypes.AbstractPageLink | |||
Known Direct Subclasses
|
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| anchor | |||||||||||
| destinationPage | |||||||||||
| spaceKey | |||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.atlassian.confluence.links.linktypes.AbstractContentEntityLink
| |||||||||||
From class
com.atlassian.renderer.links.Link
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Used predominantly to generate an anchor in the format: #<title>-<anchor>
For ease of documentation, I will use "page" to refer to content that can contain an anchor or anchor link. | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.atlassian.confluence.links.linktypes.AbstractContentEntityLink
| |||||||||||
From class
com.atlassian.renderer.links.BaseLink
| |||||||||||
From class
com.atlassian.renderer.links.Link
| |||||||||||
From class
java.lang.Object
| |||||||||||
Used predominantly to generate an anchor in the format: #<title>-<anchor>
For ease of documentation, I will use "page" to refer to content that can contain an anchor or anchor link.
The title component of the anchor is normally the title of the page.
However, when we render an anchor or an anchor link for a page that is included by another (via the include page macro) the title component is the title of the including page. This allows anchors links that have been declared on the including page to point to anchors declared on the included page.
For example, say page "A" contains an include page macro that includes page "B". And say if the body of page B has an anchor declared on it <a name="foo">. Page A can link to this anchor using [#foo].
If we are rendering an anchor that is several levels deep (that is,
on a page, that is being included by page, that is being included by a page), the title component is assigned the
title of the outer-most content's title. This is largely because getOriginalContext()
returns a reference to the top most context (PageContext does not maintain a stack of contexts).
| context | the context |
|---|---|
| anchor | the anchor name |