#wix blocks connect to site cms

6 messages · Page 1 of 1 (latest)

split hatch
#

Hey everyone — is it possible for a Wix Blocks app to connect directly to the CMS of the site where it’s installed?

I want to build an app that, once installed on a site, can read and use that site’s existing CMS data, instead of requiring the same data to be duplicated inside the app’s own CMS.

What’s the recommended way to approach this?

torn oar
#

I would not recommend doing that. How would you know the collection ID on the installed site?

In theory, you could ask the user to provide that value, but that would introduce additional settings to manage.

Another option would be to create the collection yourself, but in that case you’d be better off using the Data Extension instead.

What’s the benefit of storing this information in the website’s CMS rather than in the app’s own collections?

On top of that, you’d be consuming the site’s item quota, which users may not appreciate.

split hatch
#

The concern about “consuming the site’s item quota” is valid, but that’s not what I’m trying to do here.

The core issue is data duplication.

I already have this data stored and managed in my site’s CMS. I want my app to read and use that same data directly, the same way a page or dataset would—without copying it into a separate App CMS.

For example:
Imagine I have products displayed on my marketing pages, and their data is fully automated and maintained in the site’s CMS. If I build an app that needs to display those same products, I currently have to duplicate the data into the App’s CMS and then keep the two in sync manually.

That creates unnecessary work and risk:

The same data exists in two places

Changes in the site CMS don’t automatically reflect in the app

I now have to maintain a sync process for data that should be shared

What I want instead is a way for the app to consume the site’s CMS data directly, so there’s a single source of truth and no manual syncing required.

#

I feel like having such a feature on my wix block App would solve all my problems😀 studiocommunity2

torn oar
#

Have you try querying your collection from within the app? you should be able to use your local collection Id in the app

daring quail
#

I use a variety of patterns in my apps (that are built for my internal use only):

  • Collection in Blocks and hooked up to UI in the site editor. You need to add the "Connect to CMS" button in the Action Bar on the widget to see the button in the site editor (see pic).
  • Collection in Blocks and site code queries the collection.
  • Collection on Site and Blocks code queries the collection.