1<div class="row"> 2 <?php if (empty($main_blocks) || empty($side_blocks)) : ?> 3 <div class="col-md-12 wt-main-blocks"> 4 <?php foreach ($main_blocks + $side_blocks as $block_id => $block) : ?> 5 <?= view('tree-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