NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The {cloak} macro may be used in conjunction with the toggle-cloak macro to show and hide blocks of content. In this example, the {toc} macro in the first panel is cloaked. In the second contents panel, the contents are not cloaked. It is not possible to cloak a panel. The markup for the cloaked contents is shown in the last section on this page.

Contents
Contents

To create a page with a table of contents, add your headings and text. Enter the maxLevel equal to the highest numbered heading you want to see in the table of contents and the minLevel equal to the lowest numbered heading you want to see, for example, {toc:maxLevel=4|minLevel=2}. Delete this instruction and any extra headings.

First heading one

Some text.

First heading two

Some level two text.

Second heading two

Second level two text.

Second and last heading one

The markup for the cloaked contents follows.

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