jerri69 Posted June 10, 2016 Share Posted June 10, 2016 Proszę o pomoc: w sklepie 2 różne wielkości obrazka - chodzi tylko o wyświetlanie również tego drugiego rodzaju (bez skalowania) w fancybox. 1 wielkość 1000/1500px - w sklepie thickbox_default 2 wielkość 1000/800px - w sklepie thickbox_wide kod który chcę zmienić: <!-- thumbnails --> <div id="views_block" class="clearfix {if isset($images) && count($images) < 2}hidden{/if}"> {if isset($images) && count($images) > 2} <span class="view_scroll_spacer"> <a id="view_scroll_left" class="" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}"> {l s='Previous'} </a> </span> {/if} <div id="thumbs_list"> <ul id="thumbs_list_frame"> {if isset($images)} {foreach from=$images item=image name=thumbnails} {assign var=imageIds value="`$product->id`-`$image.id_image`"} {if !empty($image.legend)} {assign var=imageTitle value=$image.legend|escape:'html':'UTF-8'} {else} {assign var=imageTitle value=$product->name|escape:'html':'UTF-8'} {/if} <li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="last"{/if}> <a{if $jqZoomEnabled && $have_image && !$content_only} href="javascript:void(0);" rel="{literal}[spam-filter]/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal[spam-filter]{/literal}"{else} nie umiem napisać kodu żeby był warunek jak poniżej: { if (szerokość_oryginalny_obrazek = 1000px} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}" {else} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_wide')|escape:'html':'UTF-8'}" </if> data-fancybox-group="other-views" class="fancybox{if $image.id_image == $cover.id_image} shown{/if}"{/if} title="{$imageTitle}"> <img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default_clothing')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}" itemprop="image" /> </a> </li> {/foreach} {/if} </ul> </div> <!-- end thumbs_list --> {if isset($images) && count($images) > 2} <a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}"> {l s='Next'} </a> {/if} </div> <!-- end views-block --> <!-- end thumbnails --> Link to comment Share on other sites More sharing options...
Question
jerri69
Proszę o pomoc:
w sklepie 2 różne wielkości obrazka - chodzi tylko o wyświetlanie również tego drugiego rodzaju (bez skalowania) w fancybox.
1 wielkość 1000/1500px - w sklepie thickbox_default
2 wielkość 1000/800px - w sklepie thickbox_wide
kod który chcę zmienić:
<!-- thumbnails -->
<div id="views_block" class="clearfix {if isset($images) && count($images) < 2}hidden{/if}">
{if isset($images) && count($images) > 2}
<span class="view_scroll_spacer">
<a id="view_scroll_left" class="" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">
{l s='Previous'}
</a>
</span>
{/if}
<div id="thumbs_list">
<ul id="thumbs_list_frame">
{if isset($images)}
{foreach from=$images item=image name=thumbnails}
{assign var=imageIds value="`$product->id`-`$image.id_image`"}
{if !empty($image.legend)}
{assign var=imageTitle value=$image.legend|escape:'html':'UTF-8'}
{else}
{assign var=imageTitle value=$product->name|escape:'html':'UTF-8'}
{/if}
<li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="last"{/if}>
<a{if $jqZoomEnabled && $have_image && !$content_only} href="javascript:void(0);" rel="{literal}[spam-filter]/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal[spam-filter]{/literal}"{else}
nie umiem napisać kodu żeby był warunek jak poniżej:
{ if (szerokość_oryginalny_obrazek = 1000px}
href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}"
{else}
href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_wide')|escape:'html':'UTF-8'}"
</if>
data-fancybox-group="other-views" class="fancybox{if $image.id_image == $cover.id_image} shown{/if}"{/if} title="{$imageTitle}">
<img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default_clothing')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}" itemprop="image" />
</a>
</li>
{/foreach}
{/if}
</ul>
</div> <!-- end thumbs_list -->
{if isset($images) && count($images) > 2}
<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">
{l s='Next'}
</a>
{/if}
</div> <!-- end views-block -->
<!-- end thumbnails -->
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now