Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I put a macro in a header/footer?

Frank Boisvert November 27, 2018

I'd like to add a Composition Setup for Deck of Cards to the header or footer so it's on every page, but I can't figure it out. This page https://community.atlassian.com/t5/Confluence-questions/Hot-to-add-macros-to-a-header-footer-or-sidebar/qaq-p/623306 said to do:

{livesearch:spaceKey=bqc}

but i'm not figuring out how to do it for Composition Setup. 

Here's what I want to add for my tabs:

deck.card.border = 1px solid #eeeff0
deck.tab.active.border= #eeeff0
deck.tab.active.background = #ffffff
deck.tab.inactive.border =  1px solid #eeeff0
deck.tab.inactive.background = #eeeff0
deck.tab.spacer = 10px
deck.memory.duration = 0

1 answer

1 accepted

1 vote
Answer accepted
Ted Mahsun [ServiceRocket]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 27, 2018

Hi Frank,

Since you want to use macros in the header or footer, you'd need to know the wiki markup tags for Composition Setup. That happens to be {composition-setup}.

So to perform what you intend to do, you need to wrap your code around with the tags like this:

{composition-setup}deck.card.border = 1px solid #eeeff0
deck.tab.active.border= #eeeff0
deck.tab.active.background = #ffffff
deck.tab.inactive.border = 1px solid #eeeff0
deck.tab.inactive.background = #eeeff0
deck.tab.spacer = 10px
deck.memory.duration = 0{composition-setup}

Unfortunately, using Composition Setup in the sidebar doesn't really work (at least not in my quick tests).

If you wanted to do it for every page, you're likelier to get better results if you use a space template or a Live Template macro from the Scaffolding app.

Frank Boisvert November 27, 2018

Ah ok. Thank you. That makes sense. I did this earlier, but obviously that didn't work.

{compositionsetup: deck.card.border = 1px solid #eeeff0
deck.tab.active.border= #eeeff0
deck.tab.active.background = #ffffff
deck.tab.inactive.border = 1px solid #eeeff0
deck.tab.inactive.background = #eeeff0
deck.tab.spacer = 10px
deck.memory.duration = 0}

I haven't done any wiki markup. I'll have to find out tomorrow if we have access to those. We're on the cloud (strike that, no we're not), and I don't have admin, so hopefully it works. Right now i've just got the composition setup on each page with the tabs... About 15 pages. Not real fun having to go back and edit those.

Ted Mahsun [ServiceRocket]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 27, 2018

Ah, you're on Cloud! Well, Composition Cloud (which is still in beta) does not support the Composition Setup macro yet so that definitely won't work in your case.

Sorry about having to edit 15 pages. I've had to manually edit a huge batch of pages before and that definitely wasn't fun at all.

Frank Boisvert November 27, 2018

Wait.. i'm an idiot. We're not on the cloud. Sorry.. i'm dumb. No idea why I said that. Too many tabs open, too many beers. Ugh.

Frank Boisvert November 28, 2018

Tried this today and, like you said, it didn't work. Thanks anyway.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events