Good day,
How can i include the category image beside (left) of the description of the category in the category page ??
VM 3.0.12
Bonjour,
You need to overide in your template and change your HTML code.
I think you are french, so check here to overide http://st42.fr/astuce-joomla/29-surcharge-joomla-3
Thanks , but i know how to override ... just dont know how to call the category image ... not the thumbnail one ;)
Btw, yes im french ...Quebec Canada ;)
For the thumb :
<?php
if (!empty($this->category->images)) {
echo $this->category->images[0]->displayMediaThumb("", false);
}?>
For the full image only(minimal code here)
<img src="<?php echo JURI::root() . $this->category->images[0]->file_url ?>">
thank you ;)
It work ;)
Little thing , if i have no image for the respecting category how can i show nothing ?? ...
Because right now it show a broken image ...
Quote from: encreplus on March 15, 2016, 21:43:14 PM
Little thing , if i have no image for the respecting category how can i show nothing ?? ...
Because right now it show a broken image ...
check for
if (!empty($this->category->images) && !empty($this->category->images[0]->file_url)) {
should work
heu , i end up with a blank page...
What would be the complete code ? ... im confused ;(
Try
<?php
if (!empty($this->category->images)) {
if (!empty($this->category->images[0]->file_url)) {
echo $this->category->images[0]->displayMediaThumb("", false);
}
}?>
But i'm not here to debug your code, only to give you a solution ;)
Check your PHP config and enable error reporting(or enable it in Joomla), so you know the problem.
thanks for you help ...
Will try to figure it out ...
The result need to be full image of none ... so will play around with your code ... thanks