Skip to main content
The NCI Community Hub will be retiring in May 2024. For more information please visit the NCIHub Retirement Page:https://ncihub.cancer.gov/groups/ncihubshutdown/overview
close

Help: Wiki Macros

A macro inserts dynamic HTML data in any context supporting Wiki Formatting.

Using Macros

Macro calls are enclosed in two square brackets.

Examples

[[Timestamp]]

Display: 2024-03-29 13:01:35

[[Resource(100)]]

Display: ITCR-March-2014-AR4.pptx

[[Tag(heattransfer)]]

Display: (heattransfer not found)

To add a footnote to text you use the footnote macro. [[FootNote(Footnotes are automatically linked)]] You use the same macro but with no text to display the accumulated list of footnotes. For example:

[[FootNote]]

Display: To add a footnote to text you use the footnote macro. [1] You use the same macro but with no text to display the accumulated list of footnotes. For example:

  1. ^ Footnotes are automatically linked

Available Macros

[[BR]]
Insert a line break.
[[Span(content, attributes)]]
Wraps text or other elements inside a <span> tag.
[[Image(filename)]]
Embed an image in wiki-formatted text. The first argument is the filename of the image. The remaining arguments are optional and allow configuring the attributes and style of the rendered <img> element:{{{#!html

digits and unit are interpreted as the size (ex. 120, 25%) for the image right, left, top or bottom are interpreted as the alignment for the image nolink means without link to image source key=value style are interpreted as HTML attributes or CSS style indications for the image.Valid keys are: align, border, width, height, alt, title, longdesc, class, id and usemap }}}

[[Resource(id or alias)]]
This macro will insert a linked title to a resource. It can be passed wither an ID or alias. The remaining arguments are optional and allow for displaying various aspects of a resource: {{{#!html
UCSC Xena System generates a linked title to resource #101 UCSC Xena System generates the title for resource #101

}}}

[[Contributor(id,username,name)]
This macro will generate a link to a contributor’s page with the contributor’s name as the link text. It accepts either the contributor’s ID, username, or name. NOTE: to use a name, it must be identical to their contributor page.
[[Tag(tag)]]
This macro will generate a link to a Tag.
[[TitleIndex(prefix)]]
Inserts an alphabetic list of all wiki pages into the output. Accepts a prefix string as parameter: if provided, only pages with names that start with the prefix are included in the resulting list. If this parameter is omitted, all pages are listed.
[[FootNote(footnote text)]]
Add a footnote, or explicitly display collected footnotes when no args (footnote text) are given.
[[RandomPage]]
Generates a link to a random page.
[[Anchor(anchorname)]]
Inserts an anchor into a page.

Created on , Last modified on