Datastores allow you to define and reference objects in just about any way you want. Datastores are designed to allow you to use Marketpath CMS far beyond the limitations of what we have imagined.
A Marketpath CMS Datastore has the following default fields:
If Create a Page by Default is checked, all new datastore items will have Has URL checked by default.
Fields is where the datastore's item fields will be defined. You have the same set of field types available here as you do in custom fields - from simple field types like checkbox, html, select, and URL; object fields like article, author, datastore item; and object lists like article list, datastore item list, image list.
A Marketpath CMS Datastore Item has the following default fields:
The Datastore Fields group will show all fields defined with the Datastore.
Datastores are similar to mini-databases in that they can define a data structure and contain records using that structure. You'll want to use a datastore when you want to keep like items grouped together. Here are some common uses of a datastore.
There are unlimited ways you can use datastores to define your data.
Datastores can refer to each other creating a simple relational database, of sorts. As a developer, I can add a field that requires the editor to select a record from another specific datastore. For example, this developer course is in its own datastore named Courses. Each course includes a list of Modules which are stored in a separate datastore (fig. 1). Then each module includes a list of Lessons which are stored in yet another datastore (fig. 2).
Figure 1 - Courses datastore item with a list of datastore items from Modules datastore
Figure 2 - Modules datastore item with a list of datastore items from Lessons datastore
If you take a look at the Courses datastore field definition you'll see the type is a Datastore Item List and it is filtered to only allow items from the Modules datastore (fig. 3).
Figure 3 - Courses field definition for datastore item list, filtered by Modules datastore items
Please fill out the form below with your feedback or any questions you may have after working through the "Datastores" lesson.