{*
=========================================================
 HOME – rendu dynamique des blocs (drag & drop)
=========================================================
*}


{foreach from=$orderedBlocks item=block}

    {*
    =========================================
    SLIDER
    =========================================
    *}

    {if $block.type == 'slider_group'}

        {include
            file="module:polarisprestatheme/views/templates/hook/slider.tpl"
            slider=$block.slider
            slides=$block.slides
        }

    {elseif $block.type == 'category_group'}

        {include
            file="module:polarisprestatheme/views/templates/hook/category.tpl"
            group=$block.group
            categories=$block.categories
        }

    {elseif $block.type == 'promotion_produit'}

        {if !empty($block.products)}
            {include
                file="module:polarisprestatheme/views/templates/hook/product_sale.tpl"
                products=$block.products
            }
        {/if}

    {elseif $block.type == 'nouveau_produit'}

        {if !empty($block.products)}
            {include
                file="module:polarisprestatheme/views/templates/hook/product_new.tpl"
                products=$block.products
            }
        {/if}
    {*
    =========================================
    MARQUES
    =========================================
    *}
    {elseif $block.type == 'brand'}

        {assign var=brand value=$brands[$block.ref]}

        {if $brand && $brand->isVisible}
            {include
                file="module:polarisprestatheme/views/templates/hook/brand.tpl"
                brand=$brand
            }
        {/if}

    {*
    =========================================
    À PROPOS
    =========================================
    *}
    {elseif $block.type == 'about_group'}

       
            {include
                file="module:polarisprestatheme/views/templates/hook/about.tpl"
                group=$block.group
                about=$block.about
            }


    {elseif $block.type == 'reassurance_group'}
        {include
            file="module:polarisprestatheme/views/templates/hook/reassurance.tpl"
             group=$block.group
             reassurances=$block.reassurances
        }

    {/if}

{/foreach}