Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey! First thanks for this module, it's very great and I use it in different projects.
Now I think we also should render an entire entity instead of just showing an image with a caption. Means when using field_collection or entityreference module you can display them as a field slideshow with a specific view mode. So it's easier to control it with the field_ui or ds module.
What do you think?
Comment | File | Size | Author |
---|---|---|---|
#17 | entity_reference_support-1634412-17.patch | 15.56 KB | subspaceeddy |
#11 | entity_reference_support-1634412-11.patch | 17.16 KB | idflood |
#10 | entity_reference_support-1634412-10.patch | 15.07 KB | idflood |
#9 | entity_reference_support-1634412-9.patch | 15.54 KB | idflood |
#8 | entity_reference_support-1634412-8.patch | 14.14 KB | idflood |
Comments
Comment #1
j-phat CreditAttribution: j-phat commentedsubscribe
this would be an awesome addition to an already great module.
it would be nice to have, say, a caption field and a separate copyrights fields.
Comment #2
idflood CreditAttribution: idflood commentedI needed to have a slideshow on entity references for a project so I quickly made this patch. It's relatively basic now, but it should be enough for most cases. Let me know if something is missing or if you find any bugs.
Comment #3
idflood CreditAttribution: idflood commentedHere is a cleaner patch with a different approach:
- Added some module_invoke_all inside the main module so that it can be extended
- Created a submodule field_slideshow_entity which implement these new hooks
This way the main module stays clean and it can be extended. When this get committed other things like media/file, jacarousel and field_collection support can be moved to submodules.
There is still one little detail that bug me with this patch. In template_preprocess_field_slideshow I needed to add this:
At least this should be $item["slide"] to be more coherent (entity, video, ...). But I believe there will be certainly a need for another custom hook there.
Comment #4
idflood CreditAttribution: idflood commentedLooks like the patch in #3 needs a reroll.
Comment #5
markalosey CreditAttribution: markalosey commentedA reroll of this patch would really help me out...patch failed against the latest version of the module and dev
Comment #6
markalosey CreditAttribution: markalosey commentedPatch applies fine to 7.x-1.7 of the module....but I still can't figure out a way to get an entity reference to render as a slideshow.
Comment #7
TheJoker CreditAttribution: TheJoker commentedI do not understand why this feature was not implemented by default. You can not create a full slider only on the text box.
As for the entity that I could not bring it into the caption.
Comment #8
idflood CreditAttribution: idflood commented@TheJoker: Simply because at first field_slideshow was intended to be an image slideshow. More features are added with time but if this module doesn't suits your needs I would recommend to look at the views_slideshow module.
Here is a reroll of patch in #2 since the submodule experiment I made didn't had enough benefits.
I've added a function _field_slideshow_entityreference_field_type_settings since entityreference_field_type_settings is not in entityreference yet. @see #1580348: Make the formatters work with other reference fields
Other than that there is still some work to do, like fixing the height of the slideshow. For the height, the patch in the following issue may help a little: #1649624: Height Being Calculated Incorrectly
Comment #9
idflood CreditAttribution: idflood commentedNew patch with a little fix. There was a notice about $dimension being undefined so I made this little change:
Comment #10
idflood CreditAttribution: idflood commentedReroll of patch in #9 based on the 2.x branch. I've fixed the $dimension with a cleaner method I hope.
Comment #11
idflood CreditAttribution: idflood commentedSo the issue seems to be about some css.
In cycle, there is a condition on this
Who know why, but this set the container width to 0 and the slides then have a huge height.
In field_slideshow we let the default of containerResize to 1 so the container takes the height of the biggest slide.
http://jquery.malsup.com/cycle/options.html
One possible workaround with the following patch is to add this to the css:
But this is not really clean I think (+ it could cause issue when updating). I will try to find another way of fixing this but if you have any idea let me know.
Comment #12
DrMicky CreditAttribution: DrMicky commentedHi
Love the module and timely issue resolution / patch ...
I tried to apply this patch but am using v1.81 which seems to have the changes already applied. So how do I actually get it to render the entire entity? What am I missing? I was expecting 'render entire entity' to become an option in the caption field or something like that.
Any help appreciated
Comment #13
yannickooBTW you could also use the Cycle module which provides this functionality :)
Comment #14
RaulMuroc CreditAttribution: RaulMuroc commentedSame as #12, both topics:
Seems they should be solved in latest stable version but somehow I do not figure out to configure it. Perhaps an explanation in README.txt & module's page would be the best?
Comment #15
arbel CreditAttribution: arbel commentedI'm stuck here as well, treid to apply the patch manually, but didn't quite take...
Idan
Comment #16
paulaulloa CreditAttribution: paulaulloa commentedI'm stuck here too, I tried to apply the patch manually, but didn't work
Comment #17
subspaceeddy CreditAttribution: subspaceeddy commentedI rerolled and modified the patch against latest 7.x-1.x-dev branch if anyone needs it.
Comment #18
millionleaves CreditAttribution: millionleaves as a volunteer and commentedThis patch has saved me a couple of times - thanks to all who have contributed.
Here are two scenarios where I've needed it:
Without this patch, all images are displayed on the intended node at the same time instead of just the image currently active in the slideshow.
Not only that, but if I enable the Pager and specify the slideshow image as the pager, I get a pager block under each image.
This patch, therefore, rocks, in that it makes this module work correctly when Entity Reference is involved. It's a shame it's not been committed. Works for me!
Comment #19
John Pitcairn CreditAttribution: John Pitcairn commentedSo if the patch works and applies to current dev, what s stopping you all from tagging it RTBC? It won't be committed otherwise.