// Fix error if default blockbanner image is missing
This commit is contained in:
1 parent
19cfa443d2
commit
8cd1d623e5
2 files changed
+6
-1
No files matched your search
@@ -64,6 +64,7 @@ class BlockBanner extends Module
|
|||||||
{
|
{
|
||||||
if (!$this->isCached('blockbanner.tpl', $this->getCacheId()))
|
if (!$this->isCached('blockbanner.tpl', $this->getCacheId()))
|
||||||
{
|
{
|
||||||
|
if (file_exists(_PS_MODULE_DIR_.'blockbanner'.DIRECTORY_SEPARATOR.Configuration::get('BLOCKBANNER_IMG')))
|
||||||
$this->smarty->assign('banner_img', Configuration::get('BLOCKBANNER_IMG'));
|
$this->smarty->assign('banner_img', Configuration::get('BLOCKBANNER_IMG'));
|
||||||
$this->smarty->assign('banner_link', Configuration::get('BLOCKBANNER_LINK'));
|
$this->smarty->assign('banner_link', Configuration::get('BLOCKBANNER_LINK'));
|
||||||
$this->smarty->assign('banner_desc', Configuration::get('BLOCKBANNER_DESC'));
|
$this->smarty->assign('banner_desc', Configuration::get('BLOCKBANNER_DESC'));
|
||||||
|
|||||||
@@ -28,7 +28,11 @@
|
|||||||
<div class="banner-top">
|
<div class="banner-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a href="{$banner_link}" title="{$banner_desc}">
|
<a href="{$banner_link}" title="{$banner_desc}">
|
||||||
<img src="{$module_dir}{$banner_img}" alt="{$banner_desc}"/>
|
{if isset($banner_img)}
|
||||||
|
<img src="{$module_dir}{$banner_img}" alt=""/>
|
||||||
|
{else}
|
||||||
|
{$banner_desc}
|
||||||
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user