<div class="right-panel-boxes">
  {if !empty($BOXES)}
    {for $i = 0; $i < count($BOXES); $i++}
      
      {switch $BOXES[$i][type]}
        
        {* == STANDARD == *}

        {case standard}
          {$BOXES[$i][box] | noescape}

        {* == CUSTOM TEMPLATE - custom-templates/box_*.tpl == *}
        
        {case custom}
          {if file_exists($BASE_THEME_PATH . '/custom-templates/' . $BOXES[$i][box])}
            {include 'custom-templates/' . $BOXES[$i][box], box::$BOXES[$i] | noescape}
          {/if}

      {/switch}
      
    {/for}
  {/if}
</div>