Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Change position of category icons

Change position of category icons 3 weeks 3 days ago #25777

  • EstherS
  • EstherS's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Hello,
I'm wrestling with showing my category icons on a different place but don't know how to go about it. I don't seem to find the code and the right place.
I host my website with CloudAccess.net (in case I need to change things in one or another place.
On the picture you can see where I would like the icon:
1 before or after the category name in the heading
1 in the table in stead of the category name.
The site is sabaoutandabout.joomla.com
Thanks for helping
Esther
Attachments:

Please Log in or Create an account to join the conversation.

Change position of category icons 3 weeks 8 hours ago #25799

You can change the position of <div class="catimg"> into h2 tag.
Open /components/com_jem/views/categories/tmp/default.php, Go to line 34 and move this block into <h2> tag previous.

<?php foreach ($this->rows as $row) : ?>
<h2 class="jem cat<?php echo $row->id; ?>">
<?php if ($this->jemsettings->discatheader) { ?>
<div class="catimg">
<?php // flyer
if (empty($row->image)) {
$jemsettings = JemHelper::config();
$imgattribs = $jemsettings->imagewidth;
$imgattribs = $jemsettings->imagehight;

echo JHtml::_('image', 'com_jem/noimage.png', $row->catname, $imgattribs, true);
} else {
$cimage = JemImage::flyercreator($row->image, 'category');
echo JemOutput::flyer($row, $cimage, 'category');
}
?>
</div>
<?php echo JHtml::_('link', JRoute::_($row->linktarget), $this->escape($row->catname)); ?>
</h2>
JEM 2.2.3 - Joomla! 3.9.3 - PHP 7.2.15 - Dev Spanish

Please Log in or Create an account to join the conversation.

Change position of category icons 3 weeks 1 hour ago #25802

  • EstherS
  • EstherS's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Hi McKillo,
Thanks for the answer.
It worked! I did not put the same thing exactly that you put as I couldn't find all in my default.php. So I tried to cut and paste the lines that were kind of the same.
Maybe that's why the image is stuck to the bottom and not vertically centered?
I am working with CloudAccess as a server and the editing of the php that I found does not have line numbers. (I couldn't find the files in the backend of the joomla site, should I have?)

I now tried to figure out in the same way how to put the icon in the last row of the table but still figuring out in what map to find this table.

Please Log in or Create an account to join the conversation.

Change position of category icons 2 weeks 6 days ago #25803

If you want center img, you can write the style for div tag or modified css file.
In the previous code, change this line:
<div class="catimg">
fot this one:
<div class="catimg" style="margin-top:-2px">
Now, category icon is center
JEM 2.2.3 - Joomla! 3.9.3 - PHP 7.2.15 - Dev Spanish

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.235 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......