chup Posted April 7, 2011 Share Posted April 7, 2011 hi, is there any way that we can hide the cover images in product page to prevent it from showing?here is my code that generate the list of thumbnail, if possible i will like to hide the cover images from appearing {if isset($images)} {foreach from=$images item=image name=thumbnails} {assign var=imageIds value="`$product->id`-`$image.id_image`"} getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}"> getImageLink($product->link_rewrite, $imageIds, 'productPicTn')}" alt="{$image.legend|htmlspecialchars}" height="{$productPicTnSize.height}" width="{$productPicTnSize.width}" /> {/foreach} {/if} any input? Link to comment Share on other sites More sharing options...
chup Posted April 8, 2011 Author Share Posted April 8, 2011 problem solve, this is the code to check for cover image {if $image.id_image != $cover.id_image_only}{/if} and in my case, it will be {foreach from=$images item=image name=thumbnails} {assign var=imageIds value="`$product->id`-`$image.id_image`"} {if $image.id_image != $cover.id_image_only} getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}"> getImageLink($product->link_rewrite, $imageIds, 'productPicTn')}" alt="{$image.legend|htmlspecialchars}" height="{$productPicTnSize.height}" width="{$productPicTnSize.width}" /> {/if} {/foreach} Link to comment Share on other sites More sharing options...
perusi Posted June 23, 2011 Share Posted June 23, 2011 Can you be more specific? please Link to comment Share on other sites More sharing options...
chup Posted June 23, 2011 Author Share Posted June 23, 2011 $cover.id_image_only > this is the variables to check for cover images, basically my code check against it, if it is not cover images then the images will be allow to display. Link to comment Share on other sites More sharing options...
perusi Posted June 23, 2011 Share Posted June 23, 2011 i tried using your solution, but i think i`m missing something... i`m not so good at php code...so i think this is my problem... i`ll try again, maybe i will work.thanks again Link to comment Share on other sites More sharing options...
Uili Posted August 24, 2011 Share Posted August 24, 2011 Nice, i got this working on my thumbnails, so how could we use this code on big pics too? so the first image is not the cover one? Link to comment Share on other sites More sharing options...
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