【发布时间】:2017-12-01 20:38:58
【问题描述】:
在我的 opencart 中,我在产品类别页面中有图像。 如果我在类别中设置了图像,则在类别中显示,如果我没有在另一个中设置图像显示。
<?php if ($thumb) { ?>
<div class="category-img" style="background: url('<?php echo $thumb; ?>') no-repeat;"></div>
<?php }else{ ?>
<div class="category-img" style="background: url(image/catalog/category/default-thum.jpg) 50% 50% no-repeat;"></div>
<?php } ?>
我要修改代码。
如果我设置了图像然后显示图像, 否则如果 没有显示。
谁能告诉我如何修改代码?
【问题讨论】:
标签: php