Writes a link to a page and optionally an element. If element not provided, then page is required. If page is not provided, links to element within the current page.
Any attribute that has no namespace and begins with param.
is added to the href as a URL parameter.
The parameter name is the part of the attribute name following param.
.
When a parameter value is null
it is not added.
If the value is an
Iterable,
Iterator,
Enumeration,
or array, then each non-null element is coerced to
String as a separate
parameter in iteration order. Otherwise, the value itself is
coerced to String
for the parameter value.
Nested <core:param> or <core:params> tags will add parameters after any provided as attributes.
If there is no body, writes the target page title or element label.
Tag Information
Tag Class: | com.semanticcms.core.taglib.LinkTag |
---|---|
TagExtraInfo Class: | None |
Body Content: | scriptless |
Display Name: | None |
Dynamic Attributes: | true |
Attributes
Name | Required | Evaluation | Type | Description |
---|---|---|---|---|
class | No | Deferred-Value | Object |
The CSS class for the link.
Defaults to a target-specific value, if any defined for the target element.
To avoid the default, pass an empty class: |
book | No | Deferred-Value | String |
The book containing the page. Defaults to the book of the current JSP file. |
page | No | Deferred-Value | String |
The page-relative path to the page. If not provided, must be nested in a <core:page> tag and assumes the current page. Required when book provided. |
element | No | Deferred-Value | String |
The page-unique id of the element to link to.
This is used to reference SemanticCMS elements within a page.
Conflicts with the
To reference a specific non-SemanticCMS-element target, use the The anchor is automatically prefixed in multi-page views. The anchor is also URL-encoded. |
allowGeneratedElement | No | Runtime | boolean |
When |
anchor | No | Deferred-Value | String |
The anchor to link to on the given page.
This is used to reference non-SemanticCMS-element targets within a page.
Conflicts with the
To reference a specific SemanticCMS element, use the The anchor is automatically prefixed in multi-page views. The anchor is also URL-encoded. |
view | No | Deferred-Value | String |
The view mode to use in the link target. Although view is site defined, some common values might include:
|
small | No | Runtime | boolean |
When Use of a small link can be helpful for usability, such as when the body is a piece of information intended for quick copy/paste by the user. |
absolute | No | Runtime | boolean |
When |
canonical | No | Runtime | boolean |
When |