ricky11 Posted September 4, 2014 Share Posted September 4, 2014 In PS1609 I like that we can now insert a image banner for all subcategories as a rectangle image. The problem is that this same image appears in the parent category image and this is a square image. Is it possible to change the image (banner and thumbnail) for category and subcategory? in PS1.5 both of the images were square so it wouldn't matter, now both dimensions are different. How do you guys solve this? Thanks Ricky Link to comment Share on other sites More sharing options...
nhelliwell Posted September 4, 2014 Share Posted September 4, 2014 yeah, I've been thinking of doing this. Haven't got around to it yet, but my guess is that you'll need to add a new image size setting in the back office, and then change the section below in category.tpl to load the new image size: <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> </div> Link to comment Share on other sites More sharing options...
smartstuff Posted September 16, 2014 Share Posted September 16, 2014 Sorry for my ignorance but wouldn't this just create the problem that the OP is talking about? How would this create a thumb from a different image? We (us and the OP) need a way to create a different image for the square thumb. The system already creates a 125x125 image but this is of the 870x217 scene which equates to an actual 125x31 thumb. Sorry if your previous reply does fix this but could you explain where in the code it seeks out a new image to take a thumb from and where I can find category.tml <<< really showing my ignorance now, sorry! Paul Link to comment Share on other sites More sharing options...
Recommended Posts