Can I put a macro in a header/footer?
Asked by Frank Boisvert:

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 #eeeff0deck.tab.active.border= #eeeff0deck.tab.active.background = #ffffffdeck.tab.inactive.border =  1px solid #eeeff0deck.tab.inactive.background = #eeeff0deck.tab.spacer = 10pxdeck.memory.duration = 0 ``` |


Answers:
author: Ted Mahsun [ServiceRocket]
body: 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](https://docs.servicerocket.com/scaffolding/user-guide/basic-tutorials/putting-live-templates-to-use) from the Scaffolding app.

comments: author: Frank Boisvert
body: 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.


author: Ted Mahsun [ServiceRocket]
body: 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.


author: Frank Boisvert
body: 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.


author: Frank Boisvert
body: Tried this today and, like you said, it didn't work. Thanks anyway.