Using items as resources
The default Sitecore items are stored in resource files. At run time, items from the resource files and databases are merged into the content tree.
Items as resources support and simplify several scenarios:
-
Continuous integration through container-friendly deployment.
-
Disk-only installation of modules with easy composition and support for uninstallation.
-
Continuous integration scenarios for solution developers with blue-green deployment of code and definition items together.
-
Version upgrades.
Items in resource files are immutable. In the content tree, if you try to edit an item stored in a resource file, Sitecore copies the item to the database using the same item ID, then applies the changes, and any future changes, to this database item.
When an item with the same ID exists in both the database and the resource file, it is overridden. If an item is overridden, this means that Sitecore reads the item from the database. If you delete an overridden item, it is only deleted from the database, and Sitecore reads the item from the resource file.
You can work with items as resources or create an item package in a resource file using the Sitecore CLI.