Creating a multi-paragraph Command Style for Lyx

I have an existing LaTeX style which defines a \solution command (printing a box that also contains a solution as text, if showSolution is set).

I now created a LyX Style for this:

Style Solution
Category Exam
LatexName solution
LatexType Command
End


The LaTeX code of the solution should look like \solution{...}, which works so far. But for complex solutions, I need the command to contain other paragraph types, such as Enumerations. Usually you can nest paragraphs in Lyx by changing the Environment type and press Tab (e.g. a Verse in an Enumataion), but this approach does not work for my solution command. How do I fix it?

Further Detaisl: I use Lyx to generate LaTeX code which I copy paste into a bigger project, so changing the LaTeX solution command is no option here. Lyx has to generate Code like:

\solution
{
\begin{itemize}
\item Something
\item On more thing
\end{itemize}
}