Data Definitions

A data definition is a pre-defined set of form elements requesting specific information which is then presented to the end-user to complete. Data definitions can be created either through XML or through Cascade’s Data Definition Builder.

Create the definition

  1. Click Administration on the main menu.
  2. Select Data Definitions from the dropdown menu.
  3. Under New Container, click on New Data Definition.

If choosing to write your own XML

  1. In the view pane, click on XML link beneath the Create tab.
  2. Provide a name for the data definition in the Name field.
  3. Unless there is a specific folder to which you wish to save the definition, leave the Parent Containerfolder as-is.
  4. In the XML labeled text area, add your custom XML between the system-data-structure tags.
  5. When complete, click Submit. A green bar at the top of the page will indicate the Asset was created successfully.

If choosing to use the Data Definition Builder

  1. In the view pane, click on the General link beneath the Create tab.
  2. Provide a name for the data definition in the Name field.
  3. Unless there is a specific folder to which you wish to save the definition, leave the Parent Containerfolder as-is.
  4. In the Data Definition Builder labeled area, note there are fourteen options to add to your asset, including (in order): Group, Text Field, Text Area, WYSIWYG, Checkboxes, Dropdown, Radio Buttons, Multi-selector, Calendar, Date-time, Page Chooser, File Chooser, Block Chooser, and Symlink Chooser. As the developer, you may drag and drop any of the elements to the system-data-structure field below to create your pre-defined page for the end users. All of these elements can be re-used multiple times as needed.
  5. Whichever element is chosen and dragged to the field below, an Edit/Delete box will appear next to the new element and request the following default information:
    • Identifier – provide the tag codes that will define how this element is presented on the page. For example, if a text field is selected and the developer intends the user will assign a title to the field, the developer should decide if the title will be styled with code from the CSS, such as H1, H3, class=”subtitle”, etc. Developers can also use XML tags if XSLT is being used.
    • Label – provide a description of what information is being requested from the user such as Title, Main Content, etc.
    • Default – (optional) If prompting a user to complete a form field, the developer may create default text which will appear within the form field itself.
    • Required – indicate to the user if completion of this element is required before the page can be completed and submitted.
  6. Advanced Options:
    • Minimum number – set the minimum number of characters allowed in a field.
    • Maximum number – set the maximum number of characters allowed in a field.
    • Restrict to groups – allows a developer to restrict access to this element by group as created in the Global context.
    • Font formatting, Font assignments, Text formatting, Insert images, Insert table, HTML view – the developer can decide to restrict or allow any of these actions if the element chosen allows such options to be included.
    • Help text – the developer can provide a message for users if additional instructions or contact information is required for further assistance.
  7. Once an element is dragged to a position in the system-data-structure it cannot be moved to a new position. If the order of elements is incorrect, the element in question will need to be deleted and the developer will need to begin again by selecting an element and dragging it to the proper position.

Create a working example of a data definition

Create the Definition

  1. Click Administration on the main menu.
  2. Select Data Definitions from the dropdown menu.
  3. Under New Container, click on New Data Definition.
  4. In the view pane, click on the General link beneath the Create tab.
  5. In the Name field, type events.
  6. Do not change the location of the Parent Container.
  7. Drag the Text Area element to the system-data-structure field. Complete the fields as follows: Identifier: eventTitle, Label: Event Title, Default: (leave blank), Required: Yes.
  8. Click Save.
  9. Drag the Calendar element to the field below. Complete the fields as follows: Identifier: eventDate, Label: Select Event Date, Default: (leave blank), Required: Yes.
  10. Drag the WYSIWYG element to the field below. Complete the fields as follows: Identifier: eventDetails, Label: Event Details, Default: (leave blank), Required: Yes.
  11. Click Submit. A green bar at the top of the page will indicate the item was created successfully.

Copy the standard page content type

  1. While still in the Administration area, select Content Types in the left navigation bar.
  2. Select an existing Content Type.
  3. Click the Copy tab.
  4. In the System Name field, type Events.
  5. Click Submit to copy the Content Type. A green bar at the top of the page will indicate ‘Copy successful’.

Assign the data definition

  1. Go to the Edit tab and click the browse icon located to the right of Data Definition.
  2. Select the events Data Definition and click Confirm. Upon confirming the events data definition has been assigned, click Submit.

Create a page with structured data

  1. Go back to the Home area.
  2. Select New | Default | Page to create a new page.
  3. Click the System pane in order to type in “example-event-name” for the System Name field.
  4. Click the Parent Folder browse icon, select _cms/resources. Click Confirm.
  5. Click on the System tab to find the Content Type, click the browse icon to choose the new Eventstype. Click Confirm.
  6. The page will reload and the main default region will be empty.
  7. Click Submit to save your changes.

Create an events folder

  1. Select New | Default | Folder from the menu bar.
  2. Type Events into the System Name field to name your folder.
  3. Click the Parent Folder browse icon, select Base Folder and click Confirm.
  4. When finished, click Submit to create the new folder.

Create an Asset Factory for New Events

  1. Go the Administration menu, and select Asset Factories in the sidebar.
  2. Click New Asset Factory in the Asset Factories section.
  3. Select Page from the list of Asset Factory types and click Submit.
  4. Type “New Events” into the Name field.
  5. Click the Base Asset browse icon, select _cms/resources/example-events-name and click Confirm.
  6. Click the Placement Folder browse icon and select the “Events” folder created in the previous step.
  7. Select the group/s that should have access to this resource.
  8. When finished click Submit to save changes.

Create a new event page

  1. From the top-navigation menu bar, click New | New Events
  2. Provide a file name in the System Name field.
  3. Leave the Parent Folder pointing to the Events folder as previously assigned.
  4. Fill in the Event Title, Select Event Date, and Event Details fields.
  5. Click Submit to save the new event.

Steps for advanced functionality with Data Definitions is available in a later chapter.