replaces setting layout in callback by block