A Joomla question that I'm not getting help with from their forums

Hi, This is really a question I posted on the Joomla forums but have received no replies. As I’m sure it’s simply a case of me knowing nothing about PHP I’m hoping either a) someone can help me with the code, or b) point me in the right direction. I apologize if this is the wrong forum to be posting to and would appreciate advice on where else I could try apart from the standard Joomla forums.

I’m trying to change the output of com_content/category/blog_children.php. The code below outputs the category description of subcategories (if selected in category options of menu item)

<?php if ($this->params->get('show_subcat_desc') == 1) :?> <?php if ($child->description) : ?>
<?php echo JHtml::_('content.prepare', $child->description, '', 'com_content.category'); ?>
<?php endif; ?> <?php endif; ?>

What I want to do is replace the category description with the category image only.

Found this code in blog.php that I assume calls the category image

<?php if ($this->params->get('show_description_image') && $this->category->getParams()>get('image')) : ?>

<?php endif; ?>

Knowing nothing about php I decided just to paste this code into blog_children.php in the appropriate div, but nothing happens. I’m hoping someone can help me out with a bit of code that will achieve this.

TIA

Friendly advice: :smiley:

Start with PHP /MYSQL for Dummies like I did.
Maybe… in a few years we both might understand what that code actually does.
Seriously, start with the basics. Watch the code work :o It’s fun.

^ What he said.

What you should also do is set up a server on localhost to try out the code snippets. :wink: [for security]

Thanks guys. Actually found the answer after some intense googling. The code was nothing like anything I’d found myself - could have been years trying to sort myself! Thanks for the advice though. Learning php is on my long list of things to do when I get chance.

Sponsor our Newsletter | Privacy Policy | Terms of Service