Hi, is there a way where I can create an interface using JS API for manipulating metadata values for multiple pages in one go? User can be given an option to select number of rows of pages displayed and the corresponding metadata field to update and even bulk update for number of rows in a customizable table. How can I start this with?
Back end interface to manipulate metadata values of pages
You could try and do this using an asset listing that lists the pages, and with each one have a field for the value you want to update. Then on the page contents of the asset listing include your JS API code and use the batching feature of the API to update values on multiple assets at once.
https://matrix.squiz.net/manuals/web-services/chapters/javascript-api#Batching-Requests
Hi Bart,
Would you have a working example to show as an idea. I’m new to Sqiuz and batching requests seem a bit odd to me. If you could show me how to start this with, would be very helpful.
Many thanks.
Hi Bart,
I have used React JS to create the frontend for the above interface. Would you know how to integrate React into Squiz. I used production versions js of React but they seem to give me an error for different components. Do I have to load specific components every time?
Thanks.
Hi Heidi,
I’m not React expert, but I believe you just load the JS files into Matrix as per any other react web project?
If you are getting errors for your components, maybe your react/JS code is incorrect? The Matrix CMS works fine with React, as it’s just static JS really, so it is possible to build a react app in Matrix.