display subcategories images from category_subcategories.php

5 years 2 months ago #33721 by gauthier
I am trying to display images of subcategories when subcategories link are created in a category view

I tried
foreach ($this->categories as $sub) :
   <?php echo $sub->image; ?>
   <a  class="btn btn-danger" href="<?php echo JRoute::_( FlexicontentHelperRoute::getCategoryRoute($sub->slug) ); ?>">
   <?php echo $this->escape($sub->title); ?>
endforeach;

The problem is: the image displayed is the main category image and not from sub-categories. I had the same problem with the faq template.

There is a way to solve this problem?

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

5 years 2 months ago #33723 by ggppdk
Hello,
Upcoming version has a fully customized subcategory listing (for all templates), with title/description/image thumbnail parameters, and separator/prefix/suffix


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

5 years 2 months ago #33733 by gauthier
Great!

But I have to build that now, do you have any peace of code that I could integrate?

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

5 years 2 months ago #33770 by gauthier
How I could access this information?
it is a print_r from my subcategory
[data:protected] => stdClass Object
                (
                    [target] => _:default
                    [image] => images/stories/icons/news.png
(...)
calling $sub->image display the parent image
[image] =>
This is a bug or by default?

How I could use image field from first box?

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

5 years 1 month ago #33815 by ggppdk
Hello,
finished final, better use the built-in method instead of doing it manually, Check for new public download tomorrow or the day after

Regards


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.