Controller class for dynamic layouts.