Id Macro

Last modified by Admin on 2024/03/29 07:51

cogAllows putting a reference/location in a page
TypeJAR
Category
Developed by

XWiki Development Team

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard

Installable with the Extension Manager

Description

Allows putting a reference/location in a page. In HTML for example this is called an Anchor. It allows pointing to that location, for example in links.

Usage

{{id name="someid" /}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
namenoanyNo default valueThe identifier value.

Example

[[Click here to jump to anchor "someid">>||anchor="someid"]]

{{id name="someid" /}}
The "someid" anchor where to jump

Note that the link syntax must correspond to the syntax of the document where the link is present. This means that you have to use:

SyntaxLink format
xwiki/1.0 to another document[jump to anchor>Some.Document#someid]
xwiki/2.0[[jump to anchor>>#someid]]
xwiki/2.0 to another document[[jump to anchor>>Some.Document#someid]]
xwiki/2.1[[jump to anchor>>||anchor="someid"]]
xwiki/2.1 to another document[[jump to anchor>>Some.Document||anchor="someid"]]

Result

Click here to jump to anchor "someid"


The "someid" anchor where to jump

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.rendering:xwiki-rendering-macro-id 16.2.0):

Tags: id anchor
    

Get Connected