Advertisement
Igor150195

1 экран

Apr 13th, 2021
3,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 1.44 KB | None | 0 0
  1. {if ($mode=='folder' && $page.plugin_id == '16') || $mode=='search' || $mode=='vendor' || $mode=='favorites'}
  2.     {assign var=gr_thumbs_width value=$shop2.my.gr_thumbs_width|default:'450'}
  3.     {assign var=gr_thumbs_height value=$shop2.my.gr_thumbs_height|default:'450'}
  4.     {assign var=gps_counter value=0}
  5.     {foreach from=$shop2.products key=k item=product name=gps_foo}
  6.     {if $gps_counter<1 && $product.image_filename}
  7.         <link rel="preload" as="image" href="{s3_img width=$gr_thumbs_width height=$gr_thumbs_height src=$product.image_filename method=$shop2.my.s3_img_method}" />
  8.     {else}
  9.         {break}
  10.     {/if}
  11.     {assign var=gps_counter value=$gps_counter+1}
  12.     {/foreach}
  13. {/if}
  14.  
  15. {if $mode=='main' && !empty($top_slider.blocks) && !$top_slider.hide_block}
  16.     {if preg_match("/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i", $smarty.server.HTTP_USER_AGENT)}
  17.         <link rel="preload" as="image" href="{s3_img src=$top_slider.blocks.0.image.filename width=800 method=c}" />
  18.     {else}
  19.         <link rel="preload" as="image" href="{s3_img src=$top_slider.blocks.0.image.filename width=1920 height=586 method=c}" />
  20.     {/if}
  21. {/if}
  22. {if $mode=='product'}
  23.     {assign var=card_image_width value=$shop2.my.card_image_width|default:'750'}
  24.     {assign var=card_image_height value=$shop2.my.card_image_height|default:'750'}
  25.     <link rel="preload" as="image" href="{s3_img width=$card_image_width height=$card_image_height src=$product.image_filename method=$shop2.my.s3_img_method}" />
  26. {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement