[SOLVED] Fatal error when using custom display method for image field, inside a fieldgroup field

More
9 years 6 months ago - 9 years 6 months ago #54507 by agata
Hi, thanks, that got rid of the fatal error. However now "field_home_carousel1_image##display_large_src" retrieves "/" instead of the path to the image. The field is published, added to group and added to a position in the template.
sandbox-select.wilddog.co.uk/ - the top part of the site has a carousel and each slide should feature a large image background. Other fields load correctly, just not the image.
Thanks for your help so far,
Agata

EDIT: I tested without the _src and the image loads correctly, the problem is I need it to be a background so I need to load just the path.
Last edit: 9 years 6 months ago by ggppdk.

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

More
9 years 6 months ago - 9 years 6 months ago #54508 by ggppdk
Hello

that is a different issue, please give some good description because i don't understand where you are using this,
since i do not see a flexicontent universal content module with carousel template


-- 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: 9 years 6 months ago by ggppdk.

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

More
9 years 6 months ago - 9 years 6 months ago #54509 by agata
Hi, I'm not using the module, that entire homepage is an article with a type Homepage that I built. The carousel features images (image field), titles (text field), text (textarea field) and links (text field). I created a group of fields so that I could have more items in the carousel but didn't need to create 3 fields of each. The custom code for my group field is as follows:
Code:
<div class="hero-carousel__item"> <div class="hero-carousel__bg" style="background-image:url('{{field_home_carousel1_image##display_large_src}}');"></div> <div class="hero-carousel__info-container"> <div class="hero-carousel__info pr+"> <h2 class="content-top__title">{{field_home_carousel1_title}}</h2> <div class="content-top__description">{{field_home_carousel1_text}}</div> <a href="{{field_home_carousel1_link}}" class="content-top__arrow-link"><i class="icon icon-right"></i></a> </div> </div> </div>

The images being loaded as backgrounds using the image field works fine in other parts of the website, only when I have the image loading as part of a group field it doesn't retrieve results when I try to load the path (_src). I checked and the images load correctly (as img tags) if I remove the _src, however I need them to be backgrounds.

I hope this helps. I need to run now but might provide more info later on tonight.
Best,
Agata
Last edit: 9 years 6 months ago by ggppdk.

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

More
9 years 6 months ago #54521 by agata
Good morning, were you able to recreate the issue?
Best,
Agata

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

More
9 years 6 months ago #54522 by ggppdk
Hello

the display methods of image field
display_NNN_src
was original meant to use only the first value,

i see why making this an array is useful so that it can be used inside the CUSTOM HTML parameter of a field group,
backup and try latest GitHub version


-- 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
9 years 6 months ago - 9 years 6 months ago #54523 by agata
Hello, I downloaded 7a again, installed it, fixed that fatal error from yesterday but the problem persists, any further steps I need to take?
Best,
Agata
Last edit: 9 years 6 months ago by agata.

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

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