Fields

Zesty.io's Fields Content Models create content entry fields for a content set and a view (page). Multiple field datatypes can be added to any content set or page

Overview

Zesty.io has approximately 20 field datatype options. Each option is named and describe below. As you go through adding fields to your Content Models, you'll give each field a label and reference name. The label is what you'll see in the Content section as you're making your entries. The reference is what you'll use to call that field using Parsley for templating your views, snippets, and/or feeds in the Editor section.

Table of Field Types

Field NameField DescriptionXML Syntax
Article WriterThis is a field that you can type in and add images to. You can drag and drop images into the field, and when you highlight text that you've already typed a box pops up with simple formatting options such as bold, italic, blockquote, and more.<article_writer name="articlewriter_field" name_friendly="Article Writer Field" />
ColorThis is a field where you can enter color values such as '#ffffff' or 'blue'. It has a limit of 150 characters. It currently does not validate the hex code or have a color picker.<color name="color_field" name_friendly="color_field" />
CurrencyThis is a field where you can enter a dollar sign ($), numbers, and up to 2 decimal points. For example: $15.99. It has a limit of 150 characters.<currency name="currency_field" name_friendly="Currency Field" />
DateThis is a field where you can select a date from a pop-up calendar, you cannot type a date into the field, it must be selected from the calendar. The date is string-formatted as YYYY-MM-DD. To apply date formatting use ".date()" call and include PHP data format characters.<date name="date_field" name_friendly="Date Field" />
DateTimeThis is a field where you can select a date from a pop-up calendar. After you've selected a date from the calendar, a time pop-up allows you to select a time from a 24-hour digital clock. The DateTime is string formatted YYYY-MM-DD HH-MM-SS. To apply date formatting use ".date()" call and include PHP data format characters.<datetime name="datetimefield" __ name_friendly="Datetime Field "
DropdownThis field creates a dropdown with different options made up of key:value pairs.<dropdown name="default_fields" name_friendly="Default Form Fields" options="no_form:No Form;basic_form:Patient Basic Form;adv_form:Patient Advanced Form;" />
External URLThis creates a text field for a link which requires the form of a URL, e.g., http:// or https://. It has a maximum character limit of 150 characters.<link name="link_field" name_friendly="Link Field" />
MediaThis creates a field for inserting an asset from the Media Bin. The number of assets can be limited by using the 'limit' parameter in your image tag. Note that when calling the field in your view, you must use the getImage() Parsley call to access the file URL, if not the file's CDN ID number will print out on the page. The default number of assets is 1, however this can be modified upon creation.<images name="main_image" name_friendly="Main Image" limit="1" />
Internal LinkThis field creates a dropdown with all available internal links. The dropdown will have all the pages on the site, sorted alphabetically by Navigation title. In the View what prints out is the ZID associated with the selected page. Use the Parsley call truepath() to access the page URL.<internal_link name="btn_links_to" name_friendly="Button Links To" />
MarkdownThis field creates an open text area that accepts markdown syntax and formatting.<markdown name="markdown_field" name_friendly="Markdown Field"/>
NumberThis creates a field for numbers (with optional decimal point), with a max input of 150 characters. Commas or currency signs are not allowed.<number name="number_field" name_friendly="Number Field" />
One to ManyThis field allows users to create one-to-many relationship between a page and a dataset, a pageset and a dataset, or a dataset and a dataset. There may be a limit to how many items can be related.<one_to_many name="additional_fields" name_friendly="Additional Form Fields" relationship="custom_form_fields" relationship_field="custom_field_name" />
One to OneThis field allows users to create one-to-one relationship between a page and a dataset, a pageset and a dataset, or a dataset and a dataset.<one_to_one name="employee_category" name_friendly="Employee Category" relationship="employee_category" relationship_field="employee_category" list="1" />
SortThis creates a unique field to allow for a numerical sorting of pagesets and datasets. You can change the default sort number with the plus and minus buttons in the pageset or dataset, as well as in the table view.<sort name="sort_order" name_friendly="Sort Order" />
TextThis field creates a text field limited to 150 characters.<text name="homepage_title" name_friendly="Homepage Title" />
Textarea

This creates an open text area with an unlimited character count. The bottom right corner is draggable for resizing. Line breaks print out as
tags unless you add '_raw' to the end of the field name in the Parsley call. Use carriage returns or HTML to create line breaks.

<textarea name="bubble_blurb" name_friendly="Bubble Blurb" list="1" />
Toggle

This creates a customized toggle field made up of key:value pairs. The key will either be 0 (zero) or 1 (one), however the value is customizable. Since the key is either 0 or 1, the logic for if-statements or where-statements will take the form of

{{ if {scope.item} == 0 }} {{ if {this == 0} }}

<yes_no name="field_type_toggle" name_friendly="Field Type (text: 150 character limit; textarea: unlimited)" options="0:Text;1:Textarea;" list="1"/>
UUIDThis field generates a UUID when your content model is saved.
WYSIWYGThis creates a 'What You See Is What You Get' (WYSIWYG) text field, i.e., all formatting that you have, such as bolded text, font size, italics, etc. will be exactly what you see on your site.<wysiwyg_advanced name="image_caption" name_friendly="Image Caption" />