{deck}
Plugin: Composition Plugin
In coordination with the card macro, allows for the creation of tabbed content.
Description
Usage
Parameters
| Name |
Required |
Default |
Description |
| id | | | The ID for the deck. Must be unique to this page. |
| tabLocation | | top | Either 'top', 'bottom' or 'none'. |
| class | | | The custom CSS class the deck is decorated by. |
| width | | | The width the content will be constrained to (not including any tabs). If not set, the tabs expand to display their content. |
| height | | | The height the content will be constrained to (not including any tabs). If not set, the tabs expand to display their content. |
| startHidden | | true | If set to false, the cards will be initially visible on the page until setup is complete. |
| loopCards | | false | If true, the deck will loop back to the beginning from the last card and vice versa. |
| nextAfter | | never | The number of seconds the slides will stay visible before moving to the next one. By default the current slide will not transition until prompted by the user. |
| effectType | | none | The effect to use when moving to a new slide. May be 'fade' or 'none' (the default). |
| effectDuration | | 1 | The number of seconds the transition will take to complete. Eg. '1.5'. or '10'. |
Examples
A simple deck with three cards.
See Also
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
None of our plugins have had any serious testing done with Confluence 2.7 yet. It's on the todo list, but I'm not sure when it will happen.
OK, but do you have a general idea if it should have problems with 2.7, or is there no way of knowing until you test?
No idea, basically. This particular macro is most likely to break if there were major changes in the theme. We had some problems with 2.6, but they were corrected with Atlassian's 2.6.1 release. But essentially, there's no way of knowing until it's tested...
I really like this plugin! There's one little annoyance though: if you have a link to another location on a card that is not the default/first displayed and follow than link, then if you click the browsers "back" button, it redisplays the first card and not the one you left for the link. Is there any way to change this so that it returns you to the same place (ie. shows the last shown card)?
Cheers, Rob.
You can set the 'memory' duration for the tab, but be aware that the current implementation is buggy and may crash your browser if you have many decks on your site. Essentially though, add the following to your {composition-setup}:
Where the '7' is the number of days to remember the deck position. You can change it to whatever length you like.
For some reason, my deck is not rendering properly in Firefox. The deck.card.border and deck.card.background attributes in {composite-setup} are being ignored. The tabs appear fine and as specified, but there is no visible deck.
Works fine in IE6. Both border & background are visible and as specified.
Is this a known issue, or something I am doing wrong?
It is possibly an error in the CSS for those attributes. FireFox is a bit pickier about its CSS markup than IE is. Could you post your {composition-setup} markup?
When I started having this problem, I created a test page using the example code posted above (simple deck with three cards). I saw the same thing. So it's happening even without specific {composition-setup} formatting applied.
Here's the code I was using on my original page:
{composition-setup} deck.memory.duration=21 deck.tab.active.border=2px solid black deck.tab.active.background=#ffffff deck.tab.inactive.border=1px solid gray deck.tab.inactive.background=#ffffcc deck.tab.spacer=4px deck.card.border=2px solid #cc0066 deck.card.background=#ffccff deck.loopCards=true {composition-setup}It's possible that there is a CSS definition which IE doesn't like. I know there are some problems with having multiple classes in elements, but I haven't seen this particular problem before.
Could you raise a bug report with the details above and we'll continue from there.
Is there any way to create an anchor in a card and then link to that anchor? The result would be the ability to link to a second or third card in a deck and that card would be opened when a user accesses the page.
Unfortunately not at present. There is an outstanding feature request for it, but linking into cards is one of the big weaknesses of the deck/card macros at present.
Is there anything clever you have to do to get scaffolding data items to work correctly within cards? I have had it working once, but I can't seem to get it working again. Basically, when I click on Edit on a page built on a template, the editable fields and tables do not become editable, so I cannot input or update the data.
Not that I'm aware of. Could you create a bug report with the exact markup you're using and we can try to diagnose the problem.
I'm trying to use this macro on Confluence 2.8, and it shows up blank -- I don't see the tabs or their content at all. Any idea why this might be? Do you know of a workaround?
Confluence 2.8 had significant changes to the theme, so I'm guessing that the JavaScript required by the plugin is not present. It will have to be addressed in a future release.
The only workaround I can think of would be using the 'Classic' theme, or one of the other older themes, such as Clickr, etc.