Multiple layouts
There are some ways to solve the problem of pages needing multiple layouts. The
enveloping guide can introduce you the #envelope
method.
Inheritance
Your pages can inherit from layout classes.
Generics
Your base page can have a generic type.