1<div class="row"> 2 <?php if ($main_blocks->isEmpty() || $side_blocks->isEmpty()) : ?> 3 <div class="col-md-12 wt-main-blocks"> 4 <?php foreach ($main_blocks->concat($side_blocks) as $block_id => $block) : ?> 5 <?= view('user-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> 6 <?php endforeach ?> 7 </div> 8 <?php else : ?> 9 <div class="col-md-8 wt-main-blocks"> 10 <?php foreach ($main_blocks as $block_id => $block) : ?> 11 <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> 12 <?php endforeach ?> 13 </div> 14 <div class="col-md-4 wt-side-blocks"> 15 <?php foreach ($side_blocks as $block_id => $block) : ?> 16 <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> 17 <?php endforeach ?> 18 </div> 19 <?php endif ?> 20</div> 21