Using a string defined with \newcommand as a function argument

I'm currently using LaTeX to make a poster, which is all going very nicely. However for each of the seven boxes on the poster, I've got to pass eight arguments which may change in the future. I thought a sensible thing to do would be:

\newcommand{\details}{textborder=roundedsmall,borderColor=black,headerborder=open,linewidth=1,boxshade=plain,boxColorOne=box,headerColorOne=head1,headerColorTwo=head2}


and then:

\headerbox{Aims}{name=aims,column=0,below=background,\details}{
Aims
}


However this throws out an error

Package xkeyval Error: blabla (the contents of \details) undefined in families posterbox.


I have checked that replacing the \details with the contents of the custom command works fine!

Any ideas on how to solve this?

-
Welcome to TeX.SE. If the answer below does not solve your issue, keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. This will also help to ensure that the proposed solution actually works for you. –  Peter Grill Jan 29 '12 at 0:45

one way is to invert the call structure:

\newcommand\myhead[][2]{%

@Dan David had missed an open brace. Apart from that, his code should do exactly what you seem to be asking for. Since you are not telling us what packages you are loading, it is impossible to know what "custom colours set with \definecolor" are (also, that would probably be a different question than this one). –  Bruno Le Floch Jan 29 '12 at 0:14