I am working on a project and I am facing an issue with one of its pages.
The only requirement is that, when hovering over the menu item, the image on the left/right should change as it does on the site’s homepage while retaining the design of the current Menu page.
The original menu page was set up differently, as the main collection list was linked to the product category and then the sections within the list were linked to the different collection lists. With this setup, it was not possible to fetch the product image from the CMS as the images are present in the product collection and not the product category collection.
To solve this, I have been working on a copy of the menu page, where the main list is linked to the products, but since there are many products, the page won’t load as it contains too much data and I see a Gateway Time Out issue, so I can’t publish and check the page.
Can anybody please check my site’s read-only link and provide a way out of this situation?
Gateway timeouts with CMS collections typically occur when dealing with large amounts of data or complex queries. Here are some common solutions to resolve this:
For collection loading issues:
Reduce the number of items per page using pagination
Optimize your collection list filters
Ensure your images are properly optimized
Consider using progressive loading techniques
For image hover functionality, check that your interactions are properly configured in the Elements panel and that any conditional visibility settings are correctly set up.
If you’re still experiencing timeout issues, try clearing your browser cache and testing in incognito mode to rule out any local browser issues.
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.
If you want to access the images from the Produits collection via the Catégories de Produits CMS collection, you can do so as well. Just place another collection list element inside the product category collection item on the page and add it’s source as the Products (Multi-reference) field and inside this newly created collection, you can add the Image element and you should be able to map it from the Products collection.
I shared a similar approach with screenshots in a different thread, you can check it out to visually check what I mean and probably apply it for your site as well.
I could fix this issue by adding the image inside the existing collection list, but I made its position absolute to keep the design intact. This is done on this new page.
However, I have encountered a new issue here.
Requirements:
I want when the menu-item_wrap is hovered, the images menu_img and horiz-menu_img should change as per the product.
I also want as the image changes, the text blocks inside menu_tag should display the names of the product.
By default, the images menu_img and horiz-menu_img and the menu tag should display the name and the image of the first product in the list.
For that, I have added the code below to make it work. In Console, I see that the hover happens but I don’t see it visually happening on screen.