Item Icon image does not displays in lists

More
6 years 6 months ago - 6 years 6 months ago #73819 by lipatovroman
Hello!
When I use Categories menu item


Items does not have icons.



When I change menu type to Category - all ok.

I use this code in template:
Code:
 <?php echo $item->fields["icon"]->display; ?>

When I enable display errors in Joomla config I see this error:

Notice: Undefined property: stdClass::$display in /var/www/*************/components/com_flexicontent/templates/downloads/category_items.php
on line 311


This line have code
Code:
 <?php echo $item->fields["icon"]->display; ?>

Thanks.
Last edit: 6 years 6 months ago by lipatovroman.

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

More
6 years 6 months ago #73823 by ggppdk
Hello

In the "Categories" menu item , check which Flexicontent "template" is being used
then go to Flexicontent backend templates manager and add the 'icon' field to the "Render-only" position


-- 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...

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

More
6 years 6 months ago - 6 years 6 months ago #73828 by lipatovroman

ggppdk wrote: Hello

In the "Categories" menu item , check which Flexicontent "template" is being used
then go to Flexicontent backend templates manager and add the 'icon' field to the "Render-only" position


Thanks!
But now in "Category" menu item - FC items displays 2 icons.
So, I have to remove this code from template:
Code:
<?php if ($this->params->get('intro_link_image', 1)) : ?> <img src="<?php echo $item->fields['icon']->{"display_medium_src"}; ?>" alt="<?php echo $title_encoded; ?>" /> <?php else : ?> <img src="<?php echo $item->fields['icon']->{"display_medium_src"}; ?>" alt="<?php echo $title_encoded; ?>" /> <?php endif; ?>
Last edit: 6 years 6 months ago by lipatovroman.

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

More
6 years 6 months ago #73830 by ggppdk
Hello

you can remove the code
or you can change the display parameters (display parameters TAB) regarding image by editing the category layout ...


-- 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...

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

More
6 years 6 months ago - 6 years 6 months ago #73837 by lipatovroman
Thanks.
I removed code.

But why this code does not work in "Categories" menu item and work in "Category" menu item?
Code:
<?php if ($this->params->get('intro_link_image', 1)) : ?> <img src="<?php echo $item->fields['icon']->{"display_medium_src"}; ?>" alt="<?php echo $title_encoded; ?>" /> <?php else : ?> <img src="<?php echo $item->fields['icon']->{"display_medium_src"}; ?>" alt="<?php echo $title_encoded; ?>" /> <?php endif; ?>
Last edit: 6 years 6 months ago by lipatovroman.

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

More
6 years 6 months ago #73842 by ggppdk
Hello

because probably you have modified the layout parameters at the category configuration
or the layout parameters in some parent category

order of heritage is
layout parameters in template manager
layout parameters in parent categories
layout parameters in category itself
-- finally these do not exists layout parameters in menu item

But when using categories menu item you only have
layout parameters in template manager


-- 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...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.816 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline