Item Carousel Not Picking up non-primary Media


I am using Item Caroussel Block to display a carousel, but I am having a hard time to display other media related to an item.
So for example on this page: I am showcasing a number of items, one of them being a chest that has more than one media attached. However, no matter what media I select to display, the carousel always shows the primary media of that item (

I can see that in the page edit the right attachment is selected, but this doesn’t seem to show up on the generation of the page?

Any assistance would be appreciated?

It looks like that’s just a bug in the Item Carousel Block module.

1 Like

Sorry about that, it was indeed a bug in the module–but it was a quick fix!

I’ve updated the Item Carousel Block module’s repo with the correct code. If you installed the module via git on the command line, you just need to git pull from within the module directory to update with the fix.

If you installed the module by downloading a zip package, we’ll include this fix on the next release. In the meantime, you can fix the issue in your own code by making the change shown in the commit:

…basically, replacing $item with $media on line 37 of view/common/block-layout/item-carousel.phtml.

Please let me know if this fix resolves the issue!

1 Like

Dear Matthew,

Thanks so much, that has indeed resolved the issue. I replaced the two variables on line 37.
Very appreciative!