Marketpath CMS Developer Tutorial Series

Datastores

Last Updated 3/6/2018

Datastores are the developers playground. Define and reference objects the way you want. Datastores are designed to allow you to use Marketpath CMS far beyond the limitations of what we at Marketpath can define for you.

Where other content types require you to use custom fields to add new data to items, you can bake it into the definition of your own objects using datastores.

Step 1: Create the datastore that you want to define. Name it something intuitive (like "Hotels", "Swimming Pools", "Staff", "Quarter Reports", etc...) and make a plan for what it should look like and how it should interact with other objects - including other datastores or datastore items - in the CMS. The better your datastore is defined before you start building it the easier it will be to satisfy all of your defined and undefined conditions for it.

Step 2: Edit the datastore fields. This is where the power of datastores is immediately visible. You have the same set of field types available here as you do in custom fields - from simple field types (checkbox, html, select, URL) to objects (article, author, datastore item) and object lists (article list, datastore item list, entity list).

Using these fields, you can represent almost any object with a defined custom shape. Using datastore item fields, you can even simulate a custom relational database - such as the classic example relating books to libraries and authors. It is even possible to model a many-to-many relationship, although doing so does require double-entry: simply add a "Datastore Item List" field to both datastores, and specify the relationship going both ways on each item.

Step 3: Create your datastore and datastore item templates, if desired. You may not need the datastore to have its own template, or you may not need the datastore items to have their own template, but if you are creating a datastore you probably want to display the items somewhere.

Step 4: Profit.

---- End of Lesson ----

Question? Correction?

Let's work together to make our documentation as helpful as possible.

What is your name? 
What is your email address? 
Feedback: