我需要添加"替换" url链接到prestashop category.tpl文件的现有图像
{if $category->id AND $category->active}
<div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite,
$category->id_image, 'category_default')|escape:'html':'UTF-8'})
center center no-repeat; background-size:cover; height:229px;"{else}
style="background: transparent url(**{$content_dir}themes/{$themename}/img/demo/category_image.jpg**) no-repeat scroll center center / cover; height: 229px"{/if}>
{if $category->description}
此图片包含链接:
<a href="/ako-nakupovat-na-splatky" title="Quatro - jednoduchý nákup na splátky" target="_blank"> <img src="http://www.quatro.sk/affiliate/quatro_850x350.jpg" width="850" height="350" alt="Quatro - jednoduchý nákup na splátky" /> </a>
答案 0 :(得分:2)
您可以删除if语句并在其中拥有自己的代码。然而,原始图像用作背景图像。因此,如果您希望在所有类别上显示相同的图像,那么您可以&#34;硬编码&#34;它在那里: