{{ dictionary }}

dictionary Summary

Field containing a list of key-value pairs

dictionary Properties

Field containing a list of key-value pairs.

Field Type Description
object_type string Will always be "dictionary".
is_valid boolean True if there is at least one key-value pair.
keys list A list containing all of the keys in the dictionary.
values object An object containing the keys and values of the dictionary.
count integer The number of key-value pairs in the dictionary.
value string The json representation of the values. For dictionary fields you do not typically care about this - use values instead.
output string The json representation of the values.
output_in_list string Same as output.
field_id string The identifier for this field.

Individual dictionary values may be accessed using the {{ dictionary.keyName }}, {{ dictionary['keyName'] }}, {{ dictionary.values.keyName }}, or dictionary.values['keyName'] syntax.

You may also treat this object as a list containing all of the keys which may be iterated using a {% for %} loop. For more details, see the examples below:

entities Properties

Contains a collection of content, including pagination-related information.

Field Type Description
object_type string Will always be "entity_collection".
is_valid true/false Returns true if the collection contains at least one entity.
items list of snippets Contains a list of content.
limit number The maximum number of snippets that could have been fetched dynamically from the database
start number The 1-based index of the first snippet that was (or would have been) dynamically fetched from the database
page number The 1-based index of the first "page" of snippets that could have been fetched dynamically from the database - as determined by the start and limit properties
total_count number The total number of snippets in the database that matched the provided filter parameters when fetching the list of fetched snippets
total_pages number The total number of "pages" of results that matched the provided filter parameters when fetching the list of fetched snippets - as determined by the total_count and limit properties
output html The default output that the entity_collection would produce if it were output directly to the template - using the "output_in_list" property of each item in the list.

profile Properties

FieldTypeDescription
object_typestring"profile"
is_validTrue|FalseTrue if this references a profile or false if the profile is null
guidguid
idstring
emailstring
force_password_resetboolean
is_activeboolean
date_activateddate
date_activation_code_expiresdate
date_first_activateddate
is_lockedboolean
date_locked_throughdate
date_last_logged_indate
is_blockedboolean
date_blockeddate
attributesdictionary_field
logged_inbooleanTrue if this profile is presently logged in on the current request
can_loginbooleanTrue if the profile exists, is active, and is not blocked or locked
settingsobjectAn object containing all of the custom profile settings for this profile
valuestringSynonymn for guid
outputhtmlThe default output that the profile produces when output directly to the template.
output_in_listhtmlThe default output that the profile produces when output directly to the template as part of a list.

Examples

List all keys and values for a dictionary field

Copy
    {% for key in entity.dictionary_field %} --equivalent to {% for key in entity.dictionary_field.keys %}
  • {{key}} = {{entity.dictionary_field.values[key]}}
  • {% endfor %}

Working with specific dictionary field properties

Copy
{% if entity.dictionary_field.is_valid %} {% if entity.dictionary_field.custom_key_name %}

Custom Key Value: {{entity.dictionary_field.custom_key_name}}

{% endif %} {% if entity.dictionary_field['custom_key_name2'] %}

Custom Key Value 2: {{entity.dictionary_field['custom_key_name2']}}

{% endif %} {% endif %}