<!-- Block mymodule -->
<div id="chcmsvignette_block_home" class="block">
<div class="block-content clearfix">
    {*$chselposts|print_r*}
    {foreach from=$chposts item=vignette name=vignloop}
      {if isset($vignette.post_img.post_default) }
        {assign var="counter" value=$smarty.foreach.vignloop.iteration}

        {if $vignettes_nbr == 3 || $vignettes_nbr == 6}
          {assign var="larg" value="4"}
        {/if}
        {if $vignettes_nbr == 5 and $counter < 3}
          {assign var="larg" value="6"}
        {/if}
        {if $vignettes_nbr == 5 and $counter > 2}
          {assign var="larg" value="4"}
        {/if}
        {if $vignettes_nbr == 4 || $vignettes_nbr == 2 || $vignettes_nbr == 1 }
          {assign var="larg" value="6"}
        {/if}

        <div class="block_content vignette_content col1 col-lg-{$larg} col-md-{$larg} col-xs-12">
          <div class="vignette_cadre">
          <section class="vignette_section">
            <a href="/selection/{$vignette.id_chcreaposts}_{$vignette.link_rewrite}">
            <div class="titre">
              <h3>{$vignette.post_title}</h3>
            </div>

              <div class="vignettage">
                <div class="vignette surimpression">
                  <p>{$vignette.post_excerpt}</p>
                </div>
              </div>
              <div class="thumbnail">
              {if $larg == 4 }
                <img src="{$urls.base_url}{$vignette.post_img.post_petit}" alt="{$vignette.post_excerpt}" title="{$vignette.post_excerpt}" />
               {else}
                <img src="{$urls.base_url}{$vignette.post_img.post_default}" alt="{$vignette.post_excerpt}" title="{$vignette.post_excerpt}" />
              {/if}
              </div>
            </a>
          </section>
          </div>
        </div>
      {/if}
    {/foreach}

</div>
</div>
<!-- /Block mymodule -->
