NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Multiple macros are available to show and hide blocks of content.  

  • If you want to specify different text for the expand and collapse links, use the combination of Cloak, Toggle Cloak, and Composition macros.
  • Otherwise, use the Expand macro. (It is easier to implement.) 

Key point for accessibility: Make sure the link text briefly and uniquely describes the hidden content or what the link does, as in the following examples:

  • Show
  • Hide

Avoid vague link text such as "Click here." 

Panel
borderColorblue
borderStylesolid
titleContents of this page

Table of Contents

Expand Macro

You can use the Expand macro to show and hide blocks of content. For examples of the Expand macro in use, try searching for the Expand macro. For instructions, refer to Atlassian help:

https://confluence.atlassian.com/conf613/expand-macro-964960814.html

Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue
PageWithExcerptwikicontent:Exit Disclaimer to Include

Cloak, Toggle Cloak, and Composition Setup Macros

Wiki Markup
{scrollbar:icons=false}

...

The Cloak macro may be used in conjunction with the Toggle Cloak macro to show and hide blocks of content. Both must be preceded by the Composition Setup macro.

This example starts with To enter the Composition Setup macro, which is not visible on the completed page. To enter the macro, type {Com and from

  1. Type as much of the following as needed to open the macro browser. 

    Code Block
    {composition
  2. From the list of macros, select Composition Setup.
  3. In the macro panel, enter the parameters. The following code block lists example parameters. 

    Code Block
    cloak.toggle.type = text
    cloak.toggle.open=[show]
    cloak.toggle.close=[hide]

The Composition Setup macro follows. It is not visible on the completed page.

Composition Setup
cloak.toggle.type = text
cloak.toggle.open=[show]
cloak.toggle.close=[hide]

In this example, a panel encloses a table of contents which may be shown or hidden. The first macro in the panel is Enter the parameters in the panel of the macro. Refer to the ServiceRocket site for documentation

Multiexcerpt include
nopaneltrue
MultiExcerptNameExitDisclaimer
PageWithExcerptwikicontent:Exit Disclaimer to Include
In this example, in the first panel, the Toggle Cloak macro with the id ID TOC precedes . Next is the Cloak macro with the id ID TOC. The Cloak macro is also in the panel, and contains the Table of Contents macro. Thus the Table of Contents macro in the first panel is cloaked.

In the second contents panel, the same Table of Contents macro is not cloaked. It is not possible to cloak a panel.

Panel
borderColorblue
borderStylesolid
titleContents of this page

Toggle Cloak
idTOC

Cloak
idTOC

To enter the macros

  1. Type as much of the following as needed to open the macro browser. 

    Code Block
    {cloak
  2. When the macro browser opens, select the Cloak or Toggle Cloak

...

  1. macro from the list.

...

  1. In the macro dialog

...

  1. box, enter the ID

...

  1. (such as TOC in the example). 
  2. Click Save.

Refer to the ServiceRocket site for documentation of the Toggle Cloak Composition Setup, Toggle Cloak, and Cloak macros:

...

  • PageWithExcerptwikicontent:Exit Disclaimer to Include

...

...

  • PageWithExcerptwikicontent:Exit Disclaimer to Include

...

The markup for the cloaked contents is shown in the last section on this page.

Composition Setup
cloak.toggle.type = text
cloak.toggle.open=[show]
cloak.toggle.close=[hide]
Panel
titleContents

Toggle Cloak
idTOC

Cloak
idTOC
42
Panel
titleContents
Table of Contents
maxLevel4
minLevel2

First heading for the table of contents

Some text.

First subheading for the table of contents

Some text.

Second subheading for the table of contents

Some text.

Markup for the cloaked contents

The markup for the cloaked contents follows.

Code Block
{composition-setup}
cloak.toggle.type = text
cloak.toggle.open=[show]
cloak.toggle.close=[hide]
{composition-setup}
{panel:title=Contents}
{toggle-cloak:id=TOC}
{cloak:id=TOC}
{toc:maxLevel=4|minLevel=1}
{cloak}

 

...