Hello community,
I searched the forum and the documentation, but I wasn't able to find a solution, so wanted to ask here.
On the website I am currently working on, I am using 'volto-slider-block' add-on. The slides that I created can't be clicked (to open the image link) on Chrome and Firefox, which is what I want. But on Safari, I can click it, and it goes to the URL of the image.
I want to disable it for the Safari as well. Does anyone know how to change this behavior?
I'd suggest creating a bug report on the github repo of the add-on.
Thanks for the suggestion. I created a bug report and they wrote back very quickly.
For anyone seeing this in the future; I found the solution by customizing the 'DefaultBody.jsx' of the 'volto-slider-block/components'. Deleted href parameter from the 'MaybeWrap' component, and voila! Now it is just an image slider.
This is what I want but I cannot get it to work. I moved all folders in src/customizations into a volto folder and placed volto-slider-block/components/DefaultBody.jsx next to it (from the training docs). Any changes I make to DefaultBody have no affect. And hot loading does not happen even though I restarted the frontend. I also added both volto and volto-slider-block paths to customizationPaths in package.json but it did not help.
@mikemets The path I would expect to work is src/customizations/@kitconcept/volto-slider-block/components/DefaultBody.jsx
I was trying to see if the instructions are wrong, but I think they're fine.
Can I customize an add-on?
You can customize files from an add-on with the same algorithm used for Volto. In thesrc/customizations
folder, move any Volto customized files tosrc/customizations/volto
. Then customize the add-on by reconstructing the full path (for example@plone-collective/datatable-tutorial/CellRenderer/Progress.jsx
would be the full path for the file that customizesdatatable-tutorial/src/CellRenderer/Progress.jsx
).
Thanks guys but still no luck. This is what I have on the filesystem:
mike@mikelap:~/instances/plone6/pd_instance/frontend$ find .|grep @kitconcept/volto-slider-block/src/components/DefaultBody.jsx
./node_modules/@kitconcept/volto-slider-block/src/components/DefaultBody.jsx
mike@mikelap:~/instances/plone6/pd_instance/frontend$ find .|grep @kitconcept/volto-slider-block/components/DefaultBody.jsx
./src/customizations/@kitconcept/volto-slider-block/components/DefaultBody.jsx
I introduced a syntax error to DefaultBody but the slider continues to work.
Did you restart Volto after adding the file? That's the only solution that I see, otherwise things look good.
@mikemets I can confirm what @davisagli says; I have also customized this component by adding copying the file to src/customizations/@kitconcept/volto-slider-block/components/
Thanks guys, the issue was resolved by removing the customizationPaths I had added to package.json
It's helpful. Thanks!