How to add icon image?
error 232
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: How to add icon image?
Philipp Esselbach
From: -
Editor
0From: -
You can do this with the site_block template.
Here an example:
Replace in the HTML part:
with:
and add the following PHP part:
This small script change the block icon image based on the block title. For example, the news block will use images/news.gif as block icon etc.
Here an example:
Replace in the HTML part:
<h1>{$insert['block_name']}</h1>
with:
<h1><img src="https://www.contentteller.com/images/{$block_image}" alt="" /> {$insert['block_name']}</h1>
and add the following PHP part:
$block_image = "default.gif";
if ( $insert['block_name'] == "News" )
{
$block_image = "news.gif";
}
elseif ( $insert['block_name'] == "Content" )
{
$block_image = "content.gif";
}
elseif ( $insert['block_name'] == "Knowledgebase" )
{
$block_image = "knowledgebase.gif";
}
This small script change the block icon image based on the block title. For example, the news block will use images/news.gif as block icon etc.
How to add different icon images next to block titles?
Thanks