Set dynamic layout based on controllers