Data record
A data record asset is an asset without any default purpose. It allows you to decide what to use it for through a metadata schema. You can build a schema with the required fields, apply it to the data record and display the metadata through other assets in Matrix, for example, an asset listing. A data record is like a standard page but without the Edit contents screen – in other words, it does not have any content.
Once you have created a data record, you can configure the asset on its associated screens. As the data record has no default purpose, all of these screens are similar to a standard page. They are described in the Asset screens documentation. This documentation will only describe how to use the data record.
Example of setting up a data record
To understand how the data record works consider the following example. You need to create a list of books contained in our library. You only want to store and show the name, description, author, and subject for each book. As there is no content for the books, you can use the data record. Create a metadata schema to store the information about the book and an asset listing to display the list of books.
Metadata schema
Create a metadata schema with the fields Description, Author, and Subject.
The Description and Author fields are text type, and the Subject field is a select type.
The values in the list for the subject are Squiz
, Squiz Matrix
and Training
.
Once you have built the schema, the Metadata section on the Details screen should look similar to that shown in the figure below.
Data record
A data record needs to be created for each book within the library, and the metadata schema applied and filled out.
-
Create a folder called
Books
. -
Apply the metadata schema.
-
Create each data record under the Books folder.
-
Fill out the metadata fields on the Metadata screen:
Asset listing
-
Create an asset listing under the site.
-
Enter the following values on the Details screen:
- Asset types to list
-
Select Data record. This will only show the data records that appear under the Books folder.
- Root nodes
-
Select the Books folder as the root node for the asset listing.
-
Specify a title for the page on the page contents bodycopy for the asset listing and the keyword replacement
%asset_listing%
on the Edit contents screen:
For each data record, show the name of the asset, description, author, and subject. Edit the contents of the default format bodycopy and enter the required keyword replacement. These keywords will depend on what the field names are in the metadata schema. An example of this is shown in the figure below.
When you preview the asset listing for each data record under the Books folder, it will show the name of the asset, description, author, and subject, as shown in the figure below.