![](/img/trans.png)
[英]How to allow custom logo image upload if logo is on home page, not in header?
[英]How to remove logo image?
我正在嘗試從頁面底部刪除徽標圖像。 徽標由以下功能生成:
function addLogoContentBlock($content, $styles) {
if(empty($content['blocks'])) return $content;
$content['blocks'][] = array(
'type' => 'container',
'orientation' => 'horizontal',
'styles' => array(
'block' => array(
'backgroundColor' => (!empty($styles['body']['backgroundColor'])) ?
$styles['body']['backgroundColor'] :
'transparent'
)
),
'blocks' => array(
array(
'type' => 'container',
'orientation' => 'vertical',
'styles' => array(
),
'blocks' => array(
array(
'type' => 'image',
'link' => 'http://www.example.com',
'src' => Env::$assets_url . '/img/logo.png',
'fullWidth' => false,
'alt' => 'logo',
'width' => '108px',
'height' => '65px',
'styles' => array(
'block' => array(
'textAlign' => 'center'
)
)
)
)
)
)
);
return $content;
}
如何刪除徽標? 我嘗試將$content['blocks']
為null,但這沒有用。
您可以刪除此行
'src' => Env::$assets_url . '/img/logo.png',
從您的代碼。
您可以使用CSS隱藏此圖片
img[alt='logo']{
display: none;
}
您可以通過alt屬性捕獲它
array(
'type' => 'image',
'link' => 'http://www.example.com',
'src' => Env::$assets_url . '/img/logo.png',
'fullWidth' => false,
'alt' => 'logo',
'width' => '108px',
'height' => '65px',
'styles' => array(
'block' => array(
'textAlign' => 'center',
'display' => 'none' // add this string
)
)
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.