Hello I’m wondering if this is possible to do in a custom code component - I want to import data from a CMS into the component and ‘save it’ somehow. Let’s assume I import some ‘Name’ and ‘Description’. The component has got two slots and I want to configure from the level of Plasmic editor whether ‘Name’ goes to the slot 1 and ‘Description’ goes to slot 2 or vice versa. Is it possible? Could somebody point me to the correct concept?
Hi @curable_cockroach! It is possible to do so without custom code components. You can fetch and update data in a data source (like a CMS or a database) from Plasmic studio.
To do so, you will use integrations (https://docs.plasmic.app/learn/integrations/), interactions (https://docs.plasmic.app/learn/interactions/), and, optionally, forms (https://docs.plasmic.app/learn/forms/).
The main idea is to set up an integration with a database, fetch the data you want, and configure a form or an interaction to save an updated state.
Let me know if you need any help or guidance!
Hi @curable_cockroach, in addition to what Tiago mentions, you can also offer custom code components to fetch and provide data to their children. (You can find some built-in examples of such CMS components in the insertion menu)
With these as well, you can use dynamic values to associate anything inside of the component with data that is fetched and provided by the component.
Thank you for these suggestions. It worked successfully
Hi there ! I feel like my goal is the same than @curable_cockroach so I’ll write my question here. Please let me know @yang if I should open another ticket. I’m wondering if it’s possible to build a in-house package so that our service is accessible from all our custom components (link to this service) ? Basically, I’d like to know if it is possible to build a package like you have done for Sanity integration, but for a in-house solution. If yes, do you know where could our team find the doc to build something like that ? Thank you in advance