FLEXIcontent related Item field.

More
3 years 3 weeks ago - 3 years 3 weeks ago #79878 by iamrobert
Hi,

Since upgrading to FLEXIcontent 3.3.10 from 3.3.9 - I'm have an issue with the related field custom html and displaying multiple image sizes:

Code:
<img class="w100 b-lazy no-load"         data-srcset="{{banner_image##display_large_src}} 1024w, {{banner_image##display_medium_src}} 640w, {{banner_image##display_small_src}} 320w"         data-src="{{banner_image##display_medium_src}}"          alt="{item->title}"          width="1800"         height="982"         />


The data-srcs render as arrays:

Code:
data-srcset="/images/banner/l_ishou-banner-1.jpg 1024w, Array 640w, Array 320w"



I get the following notices:



I have tried a reduced test case:

Code:
                        <img src="{{banner_image##display_large_src}}">                         <img src="{{banner_image##display_small_src}}">


But still get notices:

Code:
[28-Mar-2021 10:51:51 UTC] PHP Notice:  Array to string conversion in D:\2021-laragon\www\iam21\components\com_flexicontent\classes\flexicontent.fields.php on line 5501 [28-Mar-2021 10:51:51 UTC] PHP Notice:  Array to string conversion in D:\2021-laragon\www\iam21\components\com_flexicontent\classes\flexicontent.fields.php on line 5501


Is it possible to display multiple image values?

The reason is I want to load images based on screen size.
Last edit: 3 years 3 weeks ago by iamrobert.

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

More
3 years 2 weeks ago #79890 by ggppdk
Hello

i don't think this is related to new versiondisplay_small_src is a string if not inside a field group
but if inside image field is inside a field group then it is an array
can you check if image field is inside a field group ?


-- 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
3 years 2 weeks ago #79892 by iamrobert
Yes - the image field is part of a field group:

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

More
3 years 2 weeks ago - 3 years 2 weeks ago #79894 by ggppdk
Hello

you could create a custom (viewing) layout file for the relation field
and inside it loop through the values to create the desired custom display


-- 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...
Last edit: 3 years 2 weeks ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.817 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