Ignore:
Timestamp:
Oct 10, 2014, 10:24:01 AM (10 years ago)
Author:
JanisV
Message:

Code improvement: should be computed outside the loop only if thumb is needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/template/fotorama-content.tpl

    r29942 r29976  
    2020  <a href="{$thumbnail.derivative->get_url()}"
    2121    data-full="{$thumbnail.derivative_big->get_url()}" data-url="{$thumbnail.url}" data-caption="{$thumbnail.TITLE}"
    22     {if $Fotorama.nav == 'thumbs' || $Fotorama.fullscreen_nav == 'thumbs'}data-thumb="{$thumbnail.derivative_thumb->get_url()}"{/if}>
    23     {assign var=thumb_size value=$thumbnail.derivative_thumb->get_size()}
    24     {if !$Fotorama.square_thumb}<img width="{$thumb_size[0]}" height="{$thumb_size[1]}">{/if}
     22    {if $Fotorama_has_thumbs}data-thumb="{$thumbnail.derivative_thumb->get_url()}"{/if}>
     23    {if $Fotorama_has_thumbs}
     24      {assign var=thumb_size value=$thumbnail.derivative_thumb->get_size()}
     25      {if !$Fotorama.square_thumb}<img width="{$thumb_size[0]}" height="{$thumb_size[1]}">{/if}
     26    {/if}
    2527  </a>
    2628{/foreach}
Note: See TracChangeset for help on using the changeset viewer.