0%

Datastores ID: DBT-HUCO-DS

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.

Datastore Standard Fields

A Marketpath CMS Datastore has the following default fields:

  • Name
  • Title
  • Folder
  • Create Page by Default
  • Default Root Path
  • Enforce Root Path
  • Has URL
  • Authors 
  • Tags
  • 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.

Datastore Item Standard Fields

A Marketpath CMS Datastore Item has the following default fields:

  • Name
  • Title
  • Folder
  • Has URL
  • Authors 
  • Tags
  • Datastore Fields

The Datastore Fields group will show all fields defined with the Datastore. 

Uses for a 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.

  • Staff or Employees
    • Name
    • Picture
    • Job Title
    • Phone
    • LinkedIn URL
    • Twitter Handle
    • Reports To (link to staff datastore item)
  • Hotel
    • Name
    • Brand
    • Address
    • Longitude
    • Latitude
    • Reservation Link
  • Renovation Projects
    • Title
    • City
    • State
    • Project Type
    • Description
    • Image list
  • Quarterly Reports
    • Quarter Select
    • Year
    • Income
    • Expenses
    • Overview
    • Document/PDF Link

There are unlimited ways you can use datastores to define your data. 

Relational Datastores

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). 

example-datastore-modules
Figure 1 - Courses datastore item with a list of datastore items from Modules datastore

example-datastore-module-lessons
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).

example-template-datastore-course
Figure 3 - Courses field definition for datastore item list, filtered by Modules datastore items

 

 



Feedback?

Please fill out the form below with your feedback or any questions you may have after working through the "Datastores" lesson.

Your Name
Email 
Feedback / Questions