Support Center
Data Sources
Saber utilizes data sources to display several types of dynamic content on your web pages. Typically, you'd combine a data source with the List Component to render a list of HTML content on a web page. This is useful for displaying different kinds of content such as web pages, photo galleries, menus, slideshows, products, spreadsheets, social icons, as well as complex hierarchies of data.
Data Sets
A plugin for Saber, Data Sets allows web developers to generate database tables & columns of various data types along with rows of data from within Saber's Editor UI. The beauty of the architecture is that data sets are created by referencing a Partial View to determine what columns will be added to your data set.
After populating you data set with rows of data, you can use your data set as a data source for a List Component. You'll be able to filter your data to render the exact content you intend on displaying to your users.
Data Set Relationships
Data sets can contain relationships to other data sets, which allows you to populate your web pages with complex data structures. For example, if you'd like to display a list of actors/actresses and the movies they played a role in, you'll need to set up two data sets using the Filtered List relationship type.
When creating a new data set, make sure the referenced Partial View contains a List Component so that you can choose which type of Relationship you'd like to use for the list component.
Next, you should understand what types of Data Set Relationships you can choose from when creating a new data set.
Relationship Type: Related List
This relationship relies on the concept of a Parent > Child relationship, where the Parent data set uses a Partial View reference that contains a List Component, and the Child data set is used to populate the list component with child records that belong to the parent record.
To utilize a Related List relationship type, you must first create the Child data set. You must make sure that the referenced Partial View for your child data set includes a mustache variable that will represent the Relationship ID between parent & child records, something like {{parent-id}} will work. When creating your child data set, you'll need to select the Relationship data type for your parent ID column.
Then, when creating the Parent data set, you'll be able to select the Relationship data type for your list column, select the child data set to use for your relationship, and finally, choose Related List as your relationship type.
Once your Parent data set is created, you can start creating records for your data set. You may notice that when you create new records, you won't be given the option to add items to your list just yet. You must first create the record in your parent data set first, then select the record to edit, in which case you'll be able to view the list component's Content Field and add new items to your list. When you click the "Add List Item" icon for your list content field, you'll be prompted to create a new record for you Child data set, and the newly created child record will then be associated to your parent record.
Relationship Type: Filtered List
This relationship relies on the concept of a Parent > Child relationship, where the Parent data set uses a Partial View reference that contains a List Component, and the Child data set is used to populate the list component with child records based on Filter Settings specified for each record within the Parent data set.
To utilize a Filtered List relationship type, you must first create the Child data set. Then, when creating the Parent data set, you'll be able to select the Relationship data type for your list column, select the child data set to use for your relationship, and finally, choose Filtered List as your relationship type.
Once your Parent data set is created, you can start creating records for your data set. You won't be able to add records to the List component Content Field, but instead, you'll have the opportunity to create Filter Settings, Sorting Settings, and Position Settings for the List component. This will allow you to display a filtered list of Child records for your Parent record.
Relationship Type: Single Selection
This relationship relies on the concept of a Parent > Child relationship, where the Parent data set uses a Partial View reference that contains a List Component, and the Child data set is used to allow the user to select a single Child record when creating or editing the Parent record.
To utilize a Single Selection relationship type, you must first create the Child data set. Then, when creating the Parent data set, you'll be able to select the Relationship data type for your list column, select the child data set to use for your relationship, and finally, choose Single Selection as your relationship type.
Once your Parent data set is created, you can start creating records for your data set. You won't be able to add records to the List component Content Field, but instead, you'll be presented with a drop down list of Child records to choose from so you can make your selection.
Relationship Type: Multi-Selection
This relationship works just like the Single Selection relationship type. The only difference is that once you select a Child record from the drop down list within the List component Content Field, you'll have to click the "Add" button to add the selected option from the drop down list to your list of selected items. You can then view and manage your selected items and delete unwanted items.