Page 1 of 1
include html in banner title?
Posted: Mon Aug 06, 2012 9:15 pm
by toolman
Hi,
I am trying to include HTML in my banner slideshow title to create HTML text on the banner, but it is outputting the code as code. For example, instead of creating a h1, it displays: <h1>text</h1>
Any ideas how I can allow it to output the actual HTML?
Also, for some reason, my banners are being compressed slightly. Is there a way I can stop this from happening?
Thanks!
Re: include html in banner title?
Posted: Mon Aug 06, 2012 9:45 pm
by ADD Creative
A quick fix for this would to edit catalog\view\theme\default\template\module\slideshow.tpl
Change
Code: Select all
<a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" /></a>
to somthing like
Code: Select all
<a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="" /></a>
<?php echo $banner['title']; ?>
What do you mean by "compressed slightly"? Do you mean dimensions or file size?
Re: include html in banner title?
Posted: Mon Aug 06, 2012 10:00 pm
by toolman
Thanks.
By compression, I mean the image seems to become a bit blurry. I have sized it to the correct dimensions of the slider, but it doesn't look sharp like the original image.
Re: include html in banner title?
Posted: Mon Aug 06, 2012 10:14 pm
by ADD Creative
This fix may help with that. You may need to clear the image cache after doing the changes.
https://github.com/opencart/opencart/co ... df2971ff86
Re: include html in banner title?
Posted: Mon Aug 06, 2012 10:19 pm
by toolman
Thank you.
Also, is there a way to increase the banner size limit as at the moment I am limited to less than 300kb?
Re: include html in banner title?
Posted: Mon Aug 06, 2012 11:21 pm
by ADD Creative
I would try to keep you banners under 300k as bigger images will take a long time to load.
If you do need lager files you will have to edit admin\controller\common\filemanager.php and change this line.
Code: Select all
if ($this->request->files['image']['size'] > 300000) {
Re: include html in banner title?
Posted: Tue Aug 07, 2012 1:11 am
by toolman
Thanks!