diff --git a/discover/portal/articles/130-forms/99-ddl/00-intro.markdown b/discover/portal/articles/130-forms/99-ddl/00-intro.markdown new file mode 100644 index 00000000000..6358e42f09f --- /dev/null +++ b/discover/portal/articles/130-forms/99-ddl/00-intro.markdown @@ -0,0 +1,68 @@ +# Dynamic Data Lists [](id=dynamic-data-lists) + +Dynamic data lists display custom forms created from custom field sets called +*data definitions*. Data definitions consist of a form's field types (e.g., +text, boolean, date, radio buttons, selector menus, etc.) and those fields' +labels and settings. Data definitions effectively serve as data models for a +dynamic data list. For example, you could create a data definition with 2 text +fields: 1 for a user's name, and 1 for their comments. You could then display a +form that gathers user feedback via a dynamic data list that uses that data +definition. + +To summarize: + +- **Data Definitions:** Define a form's fields. +- **Dynamic Data Lists:** Display a form based on a data definition. + +Create one or multiple dynamic data lists from a single data definition. The +user data entered for each dynamic data list is kept separate, even if the data +definition is shared. For instance, you could use the example data definition +above to create several dynamic data lists, and then place them anywhere you +need to get feedback from users. Because each dynamic data list's form data is +separate, you don't need to worry about trying to figure out which dynamic data +list the user comment came from. + +Dynamic data lists are flexible. Creating data definitions and lists doesn't +require any coding. Create data definitions and dynamic data lists in from the +Site Menu's Content → Dynamic Data Lists application. However, additional +formatting can be added with +[FreeMarker](https://freemarker.apache.org/) +templates. And you don't have to restrict dynamic data lists to simple input. +You could create something as complex as an entire data entry system for real +estate listings, or any other simple list-based application you can think of. + +This section of articles shows you how to create and use data definitions and +dynamic data lists. You'll cover these topics: + +- Creating data definitions. +- Creating dynamic data lists. +- Creating form and display templates. + +## System Configuration + +There are two Dynamic Data Lists entries in System Settings: + +The Dynamic Data Lists Service entry contains one setting: + +**Add Default Structures:** +: This is enabled by default, and pre-loads several embedded data definitions to +base data lists on. Once loaded on portal startup, these definitions must be +manually deleted from the site menu. Dynamic Data Lists application. This +setting applies to the first start of a virtual instance. + +The Dynamic Data Lists entry contains three settings: + +**Changeable Default Language:** +: If enabled, the default language of a data definition becomes changeable. + +**CSV Export:** +: Choose whether DDL records can be exported in CSV format with or without a +warning, or disable this option. The warning displayed when the records are being +exported says + + Warning: This CSV file contains user supplied inputs. Opening a CSV file + in a spreadsheet program may be dangerous. + +**Default Display View:** +: Choose whether to use a table based default view or a list based default view. + diff --git a/discover/portal/articles/130-forms/99-ddl/01-creating-data-definitions.markdown b/discover/portal/articles/130-forms/99-ddl/01-creating-data-definitions.markdown new file mode 100644 index 00000000000..46dcd499915 --- /dev/null +++ b/discover/portal/articles/130-forms/99-ddl/01-creating-data-definitions.markdown @@ -0,0 +1,134 @@ +# Creating Data Definitions [](id=creating-data-definitions) + +Follow these steps to create a data definition: + +1. Open the Menu + (![Menu](../../../images/icon-menu.png)) + and expand your site's menu (the Site Administration menu). Then select + *Content* → *Dynamic Data Lists*. This opens the Dynamic Data Lists + screen. A table lists any existing dynamic data lists. + +2. Click the *Options* button at the top-right + (![Options](../../../images/icon-options.png)) + and select *Manage Data Definitions*. The Data Definitions screen appears. A + table lists any existing data definitions. Several definitions are embedded + for common use cases like contacts, events, inventory, and more. + + ![Figure 1: The Data Definitions screen.](../../../images/ddl-definitions.png) + +3. Click the *Add* button + (![Add](../../../images/icon-add.png)) + to begin creating a new data definition. This opens the + *New Data Definition* form. + +4. Give your data definition a name. Note that the definition's name will + appear to any users filling out a dynamic data list that uses the + definition. Then expand the *Details* section of the form and give it a + description. + +5. The Details section of the form also contains the field *Parent Data + Definition*. This optional field lets you select an existing data definition + (the parent) to form the basis of the new one (the child). The child + definition inherits the parent's fields and settings, which you can then add + to. When you create a dynamic data list from a child definition, it includes + the fields of the parent and child definitions. This lets you use a common + definition (the parent) as the basis of a specialized definition (the + child). For example, if you were planning a rock climbing trip, you could + use the default Events definition as the parent of a Rock Climbing Trip + definition that contains fields unique to rock climbing (e.g., climbing + equipment availability, altitude, etc.). + + To choose a parent definition, click the *Select* button below the *Parent + Data Definition* field and then select an existing definition in the dialog + that appears. + + ![Figure 2: After naming your data definition, expand the Details section of the form and give your definition a description and parent definition, if desired.](../../../images/ddl-definition-form-01.png) + +6. Add the data definition's fields in the data definition designer, which is + below the form's Details section. The designer's *View* tab, which is + selected by default, lets you create the definition in a WYSIWYG editor. You + can click the *Source* tab to work with the definition's underlying XML, but + it's much easier to stick with the WYSIWYG editor. + + In the *View* tab select the *Fields* tab. Icons representing the field + types are listed on one side and the data definition's canvas is on the + other side. To add a field type to the definition, select its icon, drag, + and drop it onto the canvas. By dragging a field onto a field that's already + on the canvas, you can nest the new field in the existing field. When you + mouse over a field on the canvas, the field action icons + (![Icons](../../../images/icon-ddl-actions.png)) + appear. Clicking the *+* icon creates a duplicate of the current field and + adds it below the current field. Clicking the trash can deletes the field. + + The following fields are available: + + - **Boolean:** A check box. + - **Color:** Specifies a color. + - **Date:** Enter a date. A valid date format is required for the date + field, but you don't have to enter a date manually. When you select the + date field a mini-calendar pops up which you can use to select a date. + - **Decimal:** Enter a decimal number. The value is persisted as a + `double`. + - **Documents and Media:** Select a file from a Documents and Media + library. + - **Geolocation:** Specify a location to associate with the document. + - **HTML:** An area that uses a WYSIWYG editor to enhance the content. + - **Integer:** Enter an integer. The value is persisted as an `int`. + - **Link to Page:** Link to another page in the same site. + - **Number:** Enter a decimal number or an integer. The value is + persisted either as a `double` or an `int`, depending on the input's + type. + - **Radio:** Displays several clickable options. The default number of + options is three but this is customizable. Only one option can be + selected at a time. + - **Select:** This is just like the radio field except that the options + are hidden and must be accessed from a drop-down menu. + - **Text:** Enter a single line of text. + - **Text Box:** This is just like the text field except you can enter + multiple lines of text or separate paragraphs. + - **Web Content:** Select web content. + + ![Figure 3: Use the data definition designer to add fields to the data definition.](../../../images/ddl-data-definition-designer.png) + +7. Edit field labels to reflect their intended data. A text field's default + label is *Text*. To use the text field as a title, then you should change + the field's label to *Title*. First select the field on the canvas. This + automatically selects the *Settings* tab on the left. Alternatively, you + can access the Settings tab by clicking the field's wrench icon. To edit a + setting value, double-click it in the Settings table and enter the new + value. The available settings are listed below. + + You can translate each of a data definition's field values to any supported + locales. To specify a field value for a translation, select the flag that + represents the locale and enter the field value for the locale. + + The following field settings are available. Note that some of these settings + are only available for specific field types: + + - **Type:** The field's type (e.g., text, radio, etc.). This setting can't + be edited, but a display template can reference it. + - **Field Label:** The field's display name. + - **Show Label:** Whether the field label is shown. + - **Required:** Whether users must fill out the field (not available for + Boolean fields). + - **Name:** The field's internal identifier. You can use this value in a + display template to read the field's data. This value is automatically + generated, but you can change it if you wish. + - **Predefined Value:** The field's default value. + - **Tip:** Text to display in a tooltip. + - **Indexable:** Whether the field is indexed for search. + - **Localizable:** Whether the field can be translated. + - **Repeatable:** Whether users can make copies of the field. + - **Width:** The field's width on the page. Possible width values are + *Small*, *Medium* and *Large* (not available for these field types: + Boolean, Documents and Media, Geolocation, Radio, and Select). + - **Multiple:** Whether the user can select more than one option. This is + only available for Select fields. + - **Options:** The options available for selection in Radio and Select + fields. You can add and remove options, and edit each option's display + name and value. + + ![Figure 4: Configure the settings for each field in your data definition.](../../../images/ddl-data-definition-settings.png) + +8. Click *Save* when you're done. Your new data definition then appears in the + table with the pre-defined ones and any you've already added. diff --git a/discover/portal/articles/130-forms/99-ddl/02-managing-data-definitions.markdown b/discover/portal/articles/130-forms/99-ddl/02-managing-data-definitions.markdown new file mode 100644 index 00000000000..85235ee45c6 --- /dev/null +++ b/discover/portal/articles/130-forms/99-ddl/02-managing-data-definitions.markdown @@ -0,0 +1,57 @@ +# Managing Data Definitions [](id=managing-data-definitions) + +There are several things you can do to manage your data definitions. Of course, +you can edit a data definition, but you can also configure its permissions, +manage its templates, copy it, or delete it. + +Follow these steps to access your portal's data definitions: + +1. Open the Menu + (![Menu](../../../images/icon-menu.png)) + and expand your site's menu (the Site Administration menu). Then select + *Content* → *Dynamic Data Lists*. This opens the Dynamic Data Lists + screen. A table lists any existing dynamic data lists. + +2. Click the *Options* button at the top-right + (![Options](../../../images/icon-options.png)) + and select *Manage Data Definitions*. The Data Definitions screen appears. A + table lists the data definitions. + +![Figure 1: You can copy an existing data definition, manage its templates, and more.](../../../images/ddl-definitions-actions.png) + +You can manage your data definitions via the *Actions* menu +(![Actions](../../../images/icon-actions.png)) +for each definition. The following options are available: + +- **Edit:** Edit the data definition. The edit screen uses the same form + that's used to + [create data definitions](/discover/portal/-/knowledge_base/7-1/creating-data-definitions). + Note that if you edit a data definition that is referenced elsewhere (e.g., + by a dynamic data list or display template), then you'll need to update that + reference. + +- **Manage Templates:** Opens the *Manage Templates* screen, which lets you + create and manage templates for the data definition. For details, see the + [documentation on templates](/discover/portal/-/knowledge_base/7-1/using-templates-to-display-forms-and-lists). + +- **Permissions:** Configure the data definition's permissions. Note that + these permissions are for an individual definition accessed through the + Dynamic Data Lists application in *Site Administration* → *Content* + → *Dynamic Data Lists*. For example, if site members have View + permission for a data definition, any site member who also has a role that + can access the Dynamic Data Lists app and its data definitions can see this + definition listed in the Manage Data Definitions screen. If you don't want + this, deselect the View permission for Site Member, and site members won't + see your data definition listed with the others. + +- **Copy:** Opens the *Copy Data Definition* form, which lets you copy the + definition and its templates. In the form, give the copied definition a new + name and description, and select whether to also copy the original + definition's templates. Click *Copy* when you're done. The copied definition + then appears in the Data Definitions table alongside any other existing + definitions. This lets you create new definitions based on existing ones, + and then modify the copied one to suit your needs. You can, of course, edit + any definition in the portal, but if you copy a definition instead, you can + still access the original. + +- **Delete:** Delete the definition. diff --git a/discover/portal/articles/130-forms/99-ddl/03-creating-data-lists.markdown b/discover/portal/articles/130-forms/99-ddl/03-creating-data-lists.markdown new file mode 100644 index 00000000000..aaf57fb45d0 --- /dev/null +++ b/discover/portal/articles/130-forms/99-ddl/03-creating-data-lists.markdown @@ -0,0 +1,116 @@ +# Creating Data Lists [](id=creating-data-lists) + +There are two places where dynamic data lists are created: + +1. **Site Administration:** Open the Menu + (![Menu](../../../images/icon-menu.png)) + and expand your site's menu (the Site Administration menu). Then select + *Content* → *Dynamic Data Lists*. This opens the Dynamic Data Lists + screen. A table contains any existing lists. Click the *Add* button + (![Add](../../../images/icon-add.png)) + to open *New List* form. + + To add Dynamic Data Lists, you must have permission to access the Dynamic + Data Lists app in Site Administration. + +2. **Dynamic Data Lists Display widget:** Navigate to the site page you want to + place this widget on, and add it to the page from *Add* + (![Add](../../../images/icon-add-app.png)) + → *Widgets* → *Collaboration* → *Dynamic Data Lists Display*. + Then click the widget's *Add List* button. This opens the *New List* form. + + To do this, you must have permission to create a new list in the widget. + +Regardless of which option you use, the steps to create a new list in the New +List form are the same: + +1. Give the list a name and a description. + +2. Select the list's data definition: click *Select* under the *Data + Definition* field, then click the definition you want to use. + +3. To use a workflow with this list, select it from the *Workflow* menu. + +4. To change the list's default permissions, expand the form's *Permissions* + section and make your selections. + +5. Click *Save* to finish creating the list. Your new list appears in the table + with any others. + + ![Figure 1: The New List form.](../../../images/ddl-add-list.png) + +## Creating List Records [](id=creating-list-records) + +By default, only administrators have permission to create list records. Follow +these steps to give other users this permission as well: + +1. Navigate to *Content* → *Dynamic Data Lists* in Site Administration. + +2. Click *Actions* + (![Actions](../../../images/icon-actions.png)) + → *Permissions* for the list you want to add the permission to. + +3. Select *Add Record* for the roles you want to have that permission, then + click *Save*. Allow unauthenticated Users to add records by giving Guest the + Add Record permission. + +Create new records in a list from the same places you can create the lists +themselves: + +1. **Site Administration:** In Site Administration, navigate to *Content* + → *Dynamic Data Lists*. Click a list in the table to view any existing + records, then click the *Add* button + (![Add](../../../images/icon-add.png)). + This opens a form based on the list's data definition, which you can then + fill out and submit to create a new record. To do this, you must have + permission to access the Dynamic Data Lists app in Site Administration. + +2. **Dynamic Data Lists Display widget:** See above for instructions on adding + this widget to a page. You must then configure the widget to display a + list's records. + + To configure the widget to display a list's records: + + - Click the widget's *Select List* button. + - In the dialog that appears, select a list, click *Save*, then close the + dialog. The widget then displays the list's existing records. + + To add a record: + + - Click the widget's *Add* button + (![Add](../../../images/icon-add.png)). + - Fill out the form that appears and click *Publish*. + +See the section below for more information on configuring the widget. + +![Figure 2: Dynamic Data Lists Display widget.](../../../images/ddl-widget.png) + +## Configuring the Dynamic Data Lists Display Widget [](id=configuring-the-dynamic-data-lists-display-widget) + +The widget's default display template isn't exciting, but it lets users see the +list's contents, and if they have permission, to add and/or edit list items. To +configure the widget, click its *Options* menu +(![Options](../../../images/icon-app-options.png)) +and select *Configuration*. This opens the Configuration dialog, with the +*Setup* tab selected by default. The Setup tab contains 2 other tabs: + +- **Lists:** Lets you select the list that the widget displays. The currently + displayed list appears at the top of the tab, while the available lists + appear in a table. To change the widget's list, select the list from the + table and click *Save*. + +- **Optional Configuration:** + + - **Display Template:** The widget's display template. + - **Form Template:** The widget's form template. + - **Editable:** Whether users can add records to the widget's list. + - **Form View:** Whether to display the Add Record form bey default, + instead of the List View. Note that even without this selected, + users can still add records via the widget's *Add* button + (![Add](../../../images/icon-add.png)). + - **Spreadsheet View:** Whether the List View displays each record in a + row, with columns for the record attributes. + +When finished, click *Save* and close the Configuration dialog. + +![Figure 3: The Dynamic Data Lists Display widget's optional configuration.](../../../images/ddl-widget-options.png) diff --git a/discover/portal/articles/130-forms/99-ddl/04-using-templates.markdown b/discover/portal/articles/130-forms/99-ddl/04-using-templates.markdown new file mode 100644 index 00000000000..6b754e4002f --- /dev/null +++ b/discover/portal/articles/130-forms/99-ddl/04-using-templates.markdown @@ -0,0 +1,31 @@ +# Using Templates to Display Forms and Lists [](id=using-templates-to-display-forms-and-lists) + +After creating data definitions and lists, you can control how the form appears +to users, and how the resulting list of records is displayed. You do this by +creating templates for each view (form view and record display, or list, view) +and selecting them in the DDL Display portlet. For example, you might need to +create a form with a subset of a data definition's fields. Rather than creating +a new definition, you can create a template that displays only the fields you +want from the existing definition. You could also use a template to arrange +fields differently, and/or with different labels and configuration options. + +Data definitions can have as many form and display templates as you care to +create (or none, if you're satisfied with the default templates). You then +choose a list's template in the Dynamic Data Lists Display widget. + +## Managing Display and Form Templates [](id=managing-display-and-form-templates) + +Since Display and Form Templates correspond to a particular data definition, +they're accessed from the Data Definitions screen of the Dynamic Data Lists +application in Site Administration. See the +[Creating Data Definitions article](/discover/portal/-/knowledge_base/7-1/creating-data-definitions) +for instructions on accessing this screen. + +The Data Definitions screen lists each definition in a table. To start working +with a definition's templates, click the definition's Actions button +(![Actions](../../../images/icon-actions.png)) +and select *Manage Templates*. This opens a screen that lists the definition's +templates. You can edit, copy, delete, or configure permissions for a +definition via its Actions button +(![Actions](../../../images/icon-actions.png)). + diff --git a/discover/portal/articles/130-forms/99-ddl/05-creating-form-templates.markdown b/discover/portal/articles/130-forms/99-ddl/05-creating-form-templates.markdown new file mode 100644 index 00000000000..9d0373d5c4e --- /dev/null +++ b/discover/portal/articles/130-forms/99-ddl/05-creating-form-templates.markdown @@ -0,0 +1,48 @@ +# Creating Form Templates [](id=creating-form-templates) + +Form templates control how the data entry form appears for a data definition. +Follow these steps to create a form template for a definition: + +1. Open the Menu + (![Menu](../../../images/icon-menu.png)) + and expand your site's menu (the Site Administration menu). Then select + *Content* → *Dynamic Data Lists*. This opens the Dynamic Data Lists + screen. A table lists any existing dynamic data lists. + +2. Click the *Options* button at the top-right + (![Options](../../../images/icon-options.png)) + and select *Manage Data Definitions*. The Data Definitions screen appears. A + table lists any existing data definitions. + +3. Click the definition's *Actions* button + (![Options](../../../images/icon-options.png)) + and select *Manage Templates*. This opens a screen that lists the + definition's templates. + +4. Click the *Add* button + (![Add](../../../images/icon-add.png)) + and select *Add Form Template*. This presents the same kind of graphical, + drag-and-drop interface used to + [create definitions](/discover/portal/-/knowledge_base/7-1/creating-data-definitions). + +5. Give your template a name, then expand the *Details* section and give it a + description. You can also use the *Mode* selector to select which mode the + template applies to (*Create* or *Edit*). + +6. Scroll down to the graphical designer in the *View* tab, and make your + desired changes. For example, you can move or delete fields, change field + labels, and more. + +7. Click *Save* when you're finished. + +Alternatively, you can create form templates from the Dynamic Data Lists Display +widget: + +1. Follow the instructions in the + [Creating Data Lists article](/discover/portal/-/knowledge_base/7-1/creating-data-lists) + for adding and configuring the widget in a site page. Make sure to configure + the widget to show the list whose definition you want to create a template + for. + +2. Click the widget's *Add Form Template* button. This opens the same form as + above for creating a form template for the list's definition. diff --git a/discover/portal/articles/130-forms/99-ddl/06-creating-display-templates.markdown b/discover/portal/articles/130-forms/99-ddl/06-creating-display-templates.markdown new file mode 100644 index 00000000000..23a647dc9ce --- /dev/null +++ b/discover/portal/articles/130-forms/99-ddl/06-creating-display-templates.markdown @@ -0,0 +1,173 @@ +# Creating Display Templates [](id=creating-display-templates) + +For every data definition, you can create as many displays as you need. If +you've created a form template that doesn't show all the fields of a particular +data definition in the data list's form view, you probably don't want to display +those fields in the list view, either. Modify the list view using Display +Templates. + ++$$$ + +**Note:** If you're familiar with +[web content templates](/discover/portal/-/knowledge_base/7-1/designing-web-content-with-templates), +display templates customize the display of a list in the same way. Display +templates are written in FreeMarker or Velocity, pulling data from the data +definition in the same way that web content templates pull data from their +structures. Also similar to web content templates, display templates can be +embedded in other display templates. This allows for reusable code, JS library +imports, or macros which will be imported by Velocity or FreeMarker templates in +the system. Embedding display templates provides a more efficient process when +you have a multitude of similar data definitions. Just import an embedded +display template and work off of it for your new display template. + +$$$ + +As with +[form templates](/discover/portal/-/knowledge_base/7-1/creating-form-templates), +you can create display templates from the Dynamic Data Lists app in Site +Administration, or the Dynamic Data Lists Display widget. + +Follow these steps to create a display template from Site Administration: + +1. Open the Menu + (![Menu](../../../images/icon-menu.png)) + and expand your site's menu (the Site Administration menu). Then select + *Content* → *Dynamic Data Lists*. This opens the Dynamic Data Lists + screen. A table lists any existing dynamic data lists. + +2. Click the *Options* button at the top-right + (![Options](../../../images/icon-options.png)) + and select *Manage Data Definitions*. The Data Definitions screen appears. A + table lists any existing data definitions. + +3. Click the definition's *Actions* button + (![Options](../../../images/icon-options.png)) + and select *Manage Templates*. This opens a screen that lists the + definition's templates. + +4. Click the *Add* button + (![Add](../../../images/icon-add.png)) + and select *Add Display Template*. This opens the New Template form. + +5. Give the template a name, then expand the *Details* section of the form and + give it a description. Also in the details section of the form, select the + templating language to use from the *Language* selector. You can choose + [FreeMarker](https://freemarker.apache.org/index.html), + or + [Velocity](https://velocity.apache.org/). + +6. In the *Script* section of the form, create your template in the editor + using the templating language you chose in the previous step. The palette to + the left of the editor contains common variables. Click a variable to insert + it in the editor. Another useful tool in the editor is the autocomplete + feature. In a FreeMarker template, you can invoke it by typing `${`, which + opens a drop-down menu of common variables. Select a variable to insert it + in the editor. Alternatively, you can upload a complete script file via the + *Browse* button below the editor. + +7. Click *Save* when you're done creating the template. + +![Figure 1: Create your display template in the editor.](../../../images/ddl-template-editor.png) + +Alternatively, you can use the Dynamic Data Lists Display widget to create +display templates: + +1. Follow the instructions in the + [Creating Data Lists article](/discover/portal/-/knowledge_base/7-1/creating-data-lists) + for adding and configuring the widget in a site page. Make sure to configure + the widget to show the list whose definition you want to create a template + for. + +2. Click the widget's *Add Display Template* button. This opens the same form + as above for creating a display template for the list's definition. + +## Display Templae Editor + +Helper variables are available in the template editor. These provide access to +most of the data that you'll use in creating Display Templates. The variables +under the heading Data List Variables let you inject specific information about +the data definition the template is being created for: + + reserved_ddm_structure_id + + reserved_record_set_description + + reserved_record_set_id + + reserved_record_set_name + + reserved_ddm_template_id + +Inside a template, these variables give the ID for the record set (that contains +all of the volunteers in our list), as well as the name, description and data +definition. + +Display the list of records by retrieving them and assigning them to the handy +`records` variable. Retrieve the list's records from `DDLDisplayTemplateHelper`, +which contains these functions: + + getDocumentLibraryPreviewURL + + getHTMLContent + + getLayoutFriendlyURL + + getRecords + + renderRecordFieldValue + +`DDLDisplayTemplateHelper` provides the ability to perform some common tasks +without any difficulty. The `getRecords` method can be used to access all of a data +definition's existing entries, and assigned to a `records` variable:: + + <#assign records = ddlDisplayTemplateHelper.getRecords(reserved_record_set_id)> + +This *fetches* the records of the data list the template is associated with. You +haven't done anything with them yet, so your display is still empty. To list all +the records, use the *Data List Records* helper in the sidebar of the template +editor. Remember to place your cursor in the proper place in the template editor +window, then click *Data List Records*. You'll see + + <#if records?has_content> + <#list records as cur_record> + ${cur_record} + + + +appear wherever you placed your cursor. You might think you'll have a nicely +formatted list of all the data records, but you won't. It will spit out +everything in the database for the given data definition, which is ugly and +practically useless: + + {uuid=52c4ac1c-afe7-963c-49c6-5279b7030a99, recordId=35926, groupId=20126, + companyId=20099, userId=20139, userName=Test Test, versionUserId=20139, + versionUserName=Test Test, createDate=2018-07-16 14:31:51.056, + modifiedDate=2018-07-16 14:31:51.058, DDMStorageId=35927, recordSetId=35922, + recordSetVersion=1.0, version=1.0, displayIndex=0, lastPublishDate=null} + +Here's a simple example template that uses a list based on the embedded Contacts +data definition, and just displays the Company Name and Email fields in a +bulleted list: + + <#assign records = ddlDisplayTemplateHelper.getRecords(reserved_record_set_id)> + +

Here are contacts by company name and email address.

+ + <#if records?has_content> + <#list records as cur_record> + + + + +Here's what it looks like: + +![Figure x: ](../../../images/ddl-contacts-template.png) + +Now you're prepared to make data lists beautiful using Diplay Templates. diff --git a/discover/portal/images/ddl-add-list.png b/discover/portal/images/ddl-add-list.png new file mode 100644 index 00000000000..501c3dc7683 Binary files /dev/null and b/discover/portal/images/ddl-add-list.png differ diff --git a/discover/portal/images/ddl-contacts-template.png b/discover/portal/images/ddl-contacts-template.png new file mode 100644 index 00000000000..58b3110848e Binary files /dev/null and b/discover/portal/images/ddl-contacts-template.png differ diff --git a/discover/portal/images/ddl-data-definition-designer.png b/discover/portal/images/ddl-data-definition-designer.png new file mode 100644 index 00000000000..cd3598760a7 Binary files /dev/null and b/discover/portal/images/ddl-data-definition-designer.png differ diff --git a/discover/portal/images/ddl-data-definition-settings.png b/discover/portal/images/ddl-data-definition-settings.png new file mode 100644 index 00000000000..aa0eda56475 Binary files /dev/null and b/discover/portal/images/ddl-data-definition-settings.png differ diff --git a/discover/portal/images/ddl-definition-form-01.png b/discover/portal/images/ddl-definition-form-01.png new file mode 100644 index 00000000000..c3e1b64e1a5 Binary files /dev/null and b/discover/portal/images/ddl-definition-form-01.png differ diff --git a/discover/portal/images/ddl-definitions-actions.png b/discover/portal/images/ddl-definitions-actions.png new file mode 100644 index 00000000000..018574034b9 Binary files /dev/null and b/discover/portal/images/ddl-definitions-actions.png differ diff --git a/discover/portal/images/ddl-definitions.png b/discover/portal/images/ddl-definitions.png new file mode 100644 index 00000000000..b36748eae16 Binary files /dev/null and b/discover/portal/images/ddl-definitions.png differ diff --git a/discover/portal/images/ddl-template-editor.png b/discover/portal/images/ddl-template-editor.png new file mode 100644 index 00000000000..7cbf2310a36 Binary files /dev/null and b/discover/portal/images/ddl-template-editor.png differ diff --git a/discover/portal/images/ddl-widget-options.png b/discover/portal/images/ddl-widget-options.png new file mode 100644 index 00000000000..e188936e3df Binary files /dev/null and b/discover/portal/images/ddl-widget-options.png differ diff --git a/discover/portal/images/ddl-widget.png b/discover/portal/images/ddl-widget.png new file mode 100644 index 00000000000..b06b0f1f184 Binary files /dev/null and b/discover/portal/images/ddl-widget.png differ diff --git a/discover/portal/images/icon-ddl-actions.png b/discover/portal/images/icon-ddl-actions.png new file mode 100644 index 00000000000..1d0229711de Binary files /dev/null and b/discover/portal/images/icon-ddl-actions.png differ