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 {deck} macro is the outer wrapper which defines the general properties of any tabs such as their graphical style, location (above or below the deck) and a unique ID that's used to remember which card you have selected for when you return to the page.
The tabs are each defined by the card macro which provides card specific settings such as the text that appears in the tab and it's access key (also known as a keyboard shortcut).
This tutorial is primarily concerned with the {deck} macro and there is a related tutorial on the card macro.
Parameters:
The {deck} macro parameters that define the position of the tabs and the CSS class used to define how they look.
{deck:id=myDeck|tablocation=top|class=someDeck}
{card}
Content
{card}
{card}
Content
{card}
{deck}
| Parameter | Required | Default | Notes |
|---|---|---|---|
| id | The ID for the deck. Must be unique to this page. | ||
| tablocation | top | Either 'top', 'bottom' or 'none'. Defaults to 'top'. | |
| class | The custom CSS class the deck is decorated by. |
Examples
The deck of cards below, that contains our examples, uses the default Confluence tabs theme. Example three shows how to use alternate themes.
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.
.png)








Comments (25)
Oct 04, 2006
Anonymous says:
How can I reference a card of the deck in the page link. I mean something like &...How can I reference a card of the deck in the page link. I mean something like
[Page#myDeck.tab2].
I tryed to insert {anchor:refTab2} and reference like [Page#refTab2], but this is not working.
Dec 28, 2006
Guy Fraser says:
This isn't currently possible as far as we are aware. Please check with the plug...This isn't currently possible as far as we are aware. Please check with the plugin author over at http://www.randombits.org.
Dec 16, 2010
Brian Schmeltz says:
Is this still the case that we cannot link from one page to a specific card on a...Is this still the case that we cannot link from one page to a specific card on another page or has this feature been added with the newer releases? If yes, how can we do it?
Dec 28, 2006
Anonymous says:
When I place a {gallery} onto a card the results are inconsistent. One one parti...When I place a {gallery} onto a card the results are inconsistent. One one particular page the gallery was shoved over several hundred pixels.
Also, is there a way to define the width of the card/deck w/o having to wrap it in a {div} or {column}?
Much thanks! D. Kozlowski. America's Army.
Dec 28, 2006
Guy Fraser says:
With regards to the issue with the gallery macro, it's probably best to contact ...With regards to the issue with the gallery macro, it's probably best to contact the author over at http://www.randombits.org. It's likely that the gallery macro isn't compatible with the deck/card macros and that RandomBits (where the deck/card macros come from) and Atlassian (who make the gallery macro) would need to work together to resolve the issue.
As for setting the width, there was a recent upgrade to the macros which I believe has a new width parameter.
Jan 31, 2007
Anonymous says:
I found a bug in that if linking to attachments on the page, that the cards afte...I found a bug in that if linking to attachments on the page, that the cards after the link will not display their content. The card with the links, will display properly however. So if the links are on the first card, the second will not display.
Jul 05, 2007
yatin Umrotkar says:
okok
Jan 25, 2008
john futcher says:
i'm probably breaking any number of GUI standards, but if I build a deck of 26 c...i'm probably breaking any number of GUI standards, but if I build a deck of 26 cards - A-Z it ends up being too wide. any idea if you can have two rows of cards? Or other suggestions on how to handle a large number of cards?
Feb 04, 2008
Limor Maayan says:
Hi, Have you by chance tested this macro with Confluence 2.7.1, or do you know ...Hi,
Have you by chance tested this macro with Confluence 2.7.1, or do you know if it should have problems with this version? We're upgrading and so far it doesn't seem to work on this version.
Thanks,
Limor
Feb 04, 2008
Guy Fraser says:
You'll have to check with the plugin author - David Peterson at http://customwar...You'll have to check with the plugin author - David Peterson at http://customware.net
Feb 29, 2008
Rob Johansen says:
I'd like to add a different image to each of my tabs. Example 3 mentions the fac...I'd like to add a different image to each of my tabs. Example 3 mentions the fact that you can, but doesn't expound further. Any advice on how I can add images to tabs (and control/suppress the mouseover colors)?
Thanks,
Rob
Feb 29, 2008
Guy Fraser says:
You can customise the deck macro using CSS - some sample graphics and CSS is pro...You can customise the deck macro using CSS - some sample graphics and CSS is provided "as is" here: Styling deck and card macros.
Mar 07, 2008
Rob Johansen says:
Is it possible to link between tabs? For example, on tab 1 provide a link that, ...Is it possible to link between tabs? For example, on tab 1 provide a link that, when clicked, displays tab 2 (or some anchor on tab 2)?
Apr 04, 2008
Alain Moran says:
Builder 3.0.2 now includes the aqua & tan styles ... to use them select the ...Builder 3.0.2 now includes the aqua & tan styles ... to use them select the 'use deck/card styles' checkbox on the css tab.
Aug 05, 2010
sandra vogler says:
Hi, we use ThemeBuilder Plugin 4.0.2 and Composition Plugin 2.3.5 with Confluen...Hi,
we use ThemeBuilder Plugin 4.0.2 and Composition Plugin 2.3.5 with Confluence 3.2.
The Documentation of ThemeBuilder Plugin shows that there must be an option to "include CSS styles for the deck/card macros": https://www.adaptavist.com/display/Builder/CSS+Tab
I don`t find this option in our Confluence. I only see
"Inherit the CSS from parent layout(s)"
"Include CSS defined on the Layout Tab"
"Include Theme Builder`s CSS enhancements"
"Include the default Confluence CSS (strongly recommended)"
Does anybody know how to get this option?
Thanks & Regards
Sandra Vogler
Jun 05, 2008
Nikunj Jariwala says:
can I add a tab for view and a tab for edit such that when I can click on view I...can I add a tab for view and a tab for edit such that when I can click on view I can see the page and click on edit to edit the page???
Aug 07, 2008
liz armstrong says:
I need help. We are developping our own Dashboard (rerouting to it) and we'd lik...I need help. We are developping our own Dashboard (rerouting to it) and we'd like to use the card/deck macro to display the following:
Tab1 = Favorite Spaces (this tab would display two columns, one with favorite spaces and one with the recently updated favorite spaces)
Tab2 = Favorite Pages (this tab would display two columns, one with favorite pages and one with recently updated favorite pages)
Tab3 = ALL (This tab would display two columns, one with ALL spaces and one with ALL recently updated)
Tab4 = Most accessed or used pages (not sure how we are going to do this one yet).
Anyway...
I am trying to use the recently-updated macro, but I'm having an extremely difficult time getting it to do all 3 functions (display for ALL, for fav pages, and for fav spaces). The default Confluence Dashboard at least displayed two of these (the recently updated for all spaces and for favorite spaces). But I can't seem to duplicate it. Is there anyone who would know what parameters I need to use to do this? Please help!!!
(We are using Themebuilder and Confluence v. 2.7)
Thanks,
Liz
Example:
Oct 26, 2009
Peter Milakovich says:
Liz, did you figure this one out? I just webstalked your AFS and personal wiki ...Liz, did you figure this one out? I just webstalked your AFS and personal wiki and didn't see any pages where you were testing this out. I haven't looked at this particular code myself, but if you've learned something since August, let me know!
Mar 12, 2009
todd hamrick says:
I am having trouble using the <deck> macro as a "rotator" within a <ta...I am having trouble using the <deck> macro as a "rotator" within a <table-plus> macro. We are using confluence 2.5.6.
On a wide range of PC configurations, about 50% view the panel just fine, and the others see all the text in the rotating deck as "all bold." Any ideas on how to address this problem (example code below)?
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Click on the links above to read the exciting announcements about the award winners.
News & Announcements
The links below will take you to articles about the latest XYZ123 news!
Content "A" goes here.
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Content "B" goes here.
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Abc de fghi jklmn op qrst uvw xzy. Abc de fghi jklmn op qrst uvw xzy.
Jan 04, 2010
Pio Lumbab says:
Greetings, Anybody know why the contents of the tabs created using the composit...Greetings,
Anybody know why the contents of the tabs created using the composition-setup/deck/card macros are not visible to anonymous users? All other content in the space are visible except for the ones inside the tabs. Contents outside of the tabs (on the same page(s)) are visible. Any help would be greatly appreciated.
Thanks!
Pio
Jan 04, 2010
Peter Milakovich says:
If you're importing page(s) from another space into your tabs, that space may no...If you're importing page(s) from another space into your tabs, that space may not have established view security for anonymous users.
Jan 04, 2010
Pio Lumbab says:
Peter, Thanks for the quick reply. I triple checked the space permissions and ...Peter,
Thanks for the quick reply. I triple checked the space permissions and anonymous has "view" access. The pages that I'm testing on are newly created. What's odd though is that I can add content at the top and the bottom of where the tabs are supposed to be. Anonymous can view this content but not the ones inside the tabs. I've searched the forums and so far, I haven't found anything.
Pio
Jan 20, 2010
Peter Milakovich says:
This is a complicated question, so bear with me. I have a deck containing sever...This is a complicated question, so bear with me. I have a deck containing several cards of content. Each card's content has a differing level of 'sensitivity'. To indicate the level of sensitivity, I have created a page for each level of sensitivity, which I import into each card in the deck. This has worked wonderfully for some time now.
However, I've been doing some review, and to conserve real estate when reviewing the deck, I wanted to cloak portions of each level of sensitivity. I changed each level of sensitivity page, cloaking a portion of the information. With this, I assumed if someone needed that information on any given card, they'd be able to expand it and review.
Unfortunately, this does not work. On each sensitivty page, I used a similar naming convention... Sensitivity Lvl 1 ended up being cloak ID SL1, with SL2, SL3, and so forth for each additional sensitivity level page. The cloaks work great on their individual page, but whe the pages were imported into each card, that's when the problem starts.
The cloak would only work on the very first card in the deck it was used on, and would not expand on any later cards. I believe this is because even though I'm importing data from external pages, the entire deck is considered a 'page' and since the sensitivity pages are used in multiple spots, it sees the second, third, etc. usage as an incorrect use of the cloak macro, since the ID is not unique.
Has anyone figured a way to get around this 'feature' so you can use static cloaked content in multiple cards of a deck?
Oct 15, 2010
Eric Caplain says:
Where do you get the card-deck macro?Where do you get the card-deck macro?
Dec 10, 2010
Brett Ryan says:
I'm trying to add tabs to the navigation section of the intranet 2 theme, has an...I'm trying to add tabs to the navigation section of the intranet 2 theme, has anyone successfully achieved this? When I add it in I get the actual script tags being rendered.