set layout in params and not recursive require javascript