Access Keys:
Skip to content (Access Key - 0)

card macro

Overview:

The {deck} and {card} macros are both part of the Composition Plugin by Customware. When used together they create a tabbed panel which is ideal for separating out blocks of related content.

The {card} macro defines the content of each card within a deck and provides card specific settings such as:

  • The text (or other wiki content, such as images) to display on the tab associated with the content
  • The keyboard shortcut (access key) used to display the card

This tutorial is primarily concerned with the {card} macro, there is a related tutorial on the deck macro which may also be of use.

Parameters:

The {card} macro parameters define the label that is displayed on the tab within a deck of cards, as well as the CSS class to be used when rendering the card whether the should be the default one displayed or not.

{deck:id=myDeck}
  {card:label=card1}
    Content
  {card}
  {card:label=card2|default=true}
    Content
  {card}
{deck}

Parameters:

Parameter Required Default Notes
label   The label displayed in the tab for this card.
default   Whether the card should be the default one displayed or not
accessKey   The keyboard shortcut for the tab. Usually 1-9.

Examples

Hints and Tips

Only use these macros where they are really needed as they can sometimes make a web page look a little cluttered.

When using these macros, remember that printouts will only include whichever card (ie. tab) is selected within each deck on a page.

Try not to nest decks of cards within each other (as seen in our examples). While it can be tempting to have a deck of sections with each section containing a deck of topics and each topic containing a deck of sub-topics, it can be very confusing for the end user if they are presented with such a structure - it's easy to loose track of where you are in relation to the other content. Instead, you should consider using the cloak macro for the inner content.

Frequently Asked Questions

Q I've set a default tab, but it's not shown by default?
A The default tab will only be shown when you first visit a page. When you select any tab, it's "remembered" (using cookies) for subsequent visits. By default, the cookie that remembers which tabs were selected will expire after 7 days - for more information, please see the composition-setup macro. adaptavist

See Also



Ask questions, get help and report bugs & issues on our Community Site

View old comments


Adaptavist Theme Builder Powered by Atlassian Confluence