> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: About CMS Collections in Blocks ## Article: About Collections ## Article Link: https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/cms-collections-in-blocks/about-cms-collections-in-blocks.md ## Article Content: # About CMS Collections in Blocks
**Editor compatibility** Wix Blocks apps aren't supported in the Wix Harmony editor. Existing Blocks apps remain available for purchase on the Wix App Market for Wix Editor and Wix Studio sites. To learn more, see [About Wix Harmony and Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-harmony-and-blocks.md).Wix Blocks lets you integrate CMS database collections into your app seamlessly. While managing collections in Blocks shares similarities with [managing collections in Wix sites](https://support.wix.com/en/article/cms-content-management-system-an-overview), there are a few key differences. Explore these distinctions in detail in this article.
Examples: To see examples of collections in Blocks, open the following templates and go to the **Databases**  tab. - [Repeater](https://dev.wix.com/apps-templates/template?id=a4a7246f-4644-48ce-81e7-2a86aa74d9e5&http_referrer=documentation) - [Recipe list](https://dev.wix.com/apps-templates/template?id=512a7d8a-1666-40c2-9586-25874d2f69b4&http_referrer=documentation)
Important: - Be mindful of [collection permissions](#permissions) and follow their [security guidelines](https://dev.wix.com/docs/develop-websites/articles/best-practices/security-best-practices.md). - How Blocks collections affect a [site's collection item limit](https://support.wix.com/en/article/wix-studio-cms-limits-on-free-sites) depends on whether the app is private or public: - **Private Blocks apps**: Items in collections from private Blocks apps count towards the site's collection item quota. - **Public Blocks apps**: Items in collections from public Blocks apps, installed from the Wix App Market, don't count towards the site's collection item quota. - When a Blocks app is installed on a site, whether a private or a public app, data requests made by the app are subject to the site's requests per minute (RPM) limits, not the app's limits. - You can also ask the [Blocks AI](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/get-started/about-the-blocks-ai.md) to add and edit collections in your app.## A Blocks collection is a placeholder The most important thing to understand about a Blocks collection is that it is a placeholder for the data of any site it's installed on. This is because a Blocks collection can be used on multiple sites. These sites can be very different from each other and have their own databases. Think about a collection that holds customer information. Every site can have a list of their own customers, and your widget can apply to all of them. When you create a collection in Blocks, you define the fields of the collection, and make it possible to refer to it in the app's code. You can also add default data in Blocks, but you don’t have to. If you do add default data, it is automatically installed on the site together with the app, and can later be replaced by data from any site the app is installed on. If you change the structure of a collection in Blocks in a future version of your app, it impacts any site it's installed on. So work with caution and don't make changes that can break sites. ## About the default data Data that you add to your Blocks collections will be imported to the site in which your app is installed, providing your site creators with default data for your app. If you choose to add default data, note that: * The site your app is installed on can change that data later. * The default data will only be imported in the first installation. If you release a new version of your app and change the data in the collection, it will not override the data that already exists in any site your app is installed on. ## Add a collection to your app To add a collection to your app: 1. Click the **CMS**  icon in your app's left menu. 2. Click **Create Collection**. 3. Create a unique [namespace](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/code-in-blocks/creating-a-namespace-for-your-app.md) for you app, if you haven't already done it. Make the namespace meaningful and clear (if you haven't named your app yet, you will be triggered to name it now). 4. Name your collection. 5. Define the structure of your collection in the **CMS**. 6. Optional - add default data to your collection. ## See your collection in the editor When you import a Blocks app that has a collection to your site, the collection will appear in the **Content Collections** section in the **CMS**  panel. Your app namespace will appear next to this collection, to indicate that it's from Blocks. From now on you can [handle your collection](https://support.wix.com/en/content-manager/content-collections) like in any other Wix site.
Important: If you delete the app from the site, the collection will be deleted as well.## Reference collection data in code To access your collection and perform various actions, query, insert, etc, use the following syntax with the [`items`](https://dev.wix.com/docs/sdk/backend-modules/data/items/introduction.md) submodule in the `data` SDK module. For example, this is how you query a collection (note that `@wix/data` cannot be tested in Blocks Preview and must be tested on a site): ```js import { items } from "@wix/data"; $w.onReady(async function() { try { const results = await items .query("@username/my-app/MyCollection") .find(); // your code using the "results" } catch (err) { console.log(err); } }); ```