Field Types

Use this reference for setting up your content type(s) and fields in your theme's config.php file. Additionally it shows how to access field content in view templates by accessing the $content theme variable.

Textfield

Renders as a HTML text input field. If the #contentformat is html/text, selected text can be formatted. Possible textfield settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'textfield' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#maxlength Between 1 and 524288 Integer yes
#contentformat 'html/text' or 'text' String yes
#help 'Write some text'. Rendered as help text. String yes

Textfield array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'textfield'
#value Text

Example:

$content['content-type-key'][0]['textfield-key']['#value']

Textarea

Renders as a HTML text area. If the #contentformat is html/text, selected text can be formatted. Possible textarea settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'textarea' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#rows Between 1 and 20 Integer yes
#maxlength Between 1 and 524288 Integer yes
#contentformat 'html/text' or 'text' String yes
#help 'Write some text'. Rendered as help text. String yes

Textarea array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'textarea'
#value Text

Example:

$content['content-type-key'][0]['textarea-key']['#value']

Image

Renders as an image upload button. It opens the Assets dialog window in order to upload an image file or insert an existing image file into the space. Possible image settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'image' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#file-extension ['jpg', 'png'] Array yes
#help 'Write some text'. Rendered as help text. String yes
#content-preview-image true or false. Rendered as thumbnail image in content overview lists. Boolean no

Image array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'image'
#caption Caption Text
#description Description Text
#width Width Number
#height Height Number
#uri #value Image URI including protocol and domain name

Example:

$content['content-type-key'][0]['image-key']['#uri']['#value']

Photosphere

Renders as an photo sphere upload button. It opens the Assets dialog window in order to upload an image (photo sphere) file or insert an existing image (photo sphere) file into the space. Possible photosphere settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'photosphere' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#file-extension ['jpg', 'png'] Array yes
#help 'Write some text'. Rendered as help text. String yes
#content-preview-image true or false. Rendered as thumbnail image in content overview lists. Boolean no

Photosphere array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'photosphere'
#caption Caption Text
#description Description Text
#width Width Number
#height Height Number
#uri #value Photosphere URI including protocol and domain name

Example:

$content['content-type-key'][0]['photosphere-key']['#uri']['#value']

Audio

Renders as an audio file upload button. It opens the Assets dialog window in order to upload an audio file or insert an existing audio file into the space. Possible audio settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'audio' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#file-extension ['mp3', 'wav'] Array yes
#help 'Write some text'. Rendered as help text. String yes

Audio array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'audio'
#caption Caption Text
#description Description Text
#duration Duration in seconds
#uri #value Audio URI including protocol and domain name

Example:

$content['content-type-key'][0]['audio-key']['#uri']['#value']

Video

Renders as a video file upload button. It opens the Assets dialog window in order to upload an video file or insert an existing video file into the space. Possible video settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'video' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#file-extension ['mp4'] Array yes
#help 'Write some text'. Rendered as help text. String yes

Video array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'video'
#caption Caption Text
#description Description Text
#width Width Number
#height Height Number
#duration Duration in seconds
#uri #value Video URI including protocol and domain name

Example:

$content['content-type-key'][0]['video-key']['#uri']['#value']

Videosphere

Renders as a video sphere file upload button. It opens the Assets dialog window in order to upload an video sphere file or insert an existing video sphere file into the space. Possible videosphere settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'videosphere' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#file-extension ['mp4'] Array yes
#help 'Write some text'. Rendered as help text. String yes

Videosphere array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'videosphere'
#caption Caption Text
#description Description Text
#width Width Number
#height Height Number
#duration Duration in seconds
#uri #value Videosphere URI including protocol and domain name

Example:

$content['content-type-key'][0]['videosphere-key']['#uri']['#value']

Color

Renders as an HTML color selector input field. Possible color settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'color' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#help 'Write some text'. Rendered as help text. String yes
#default_value '#FF0000'. Color value. String no

Color array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'color'
#value Color value (hexadecimal)

Example:

$content['content-type-key'][0]['color-key']['#value']

Date

Renders as an HTML date selector input field. Possible date settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'date' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#help 'Write some text'. Rendered as help text. String yes

Date array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'date'
#value Date value

Example:

$content['content-type-key'][0]['date-key']['#value']

Options Select

Renders as an HTML select input field. Possible options select settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'options-select' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#options ['red' => 'Red', 'green' => 'Green', 'blue' => 'Blue'] Array yes
#help 'Write some text'. Rendered as help text. String yes
#default_value 'green'. Key value from #options. String no

Options Select array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'options-select'
#value Selected option

Example:

$content['content-type-key'][0]['options-select-key']['#value']

3D Model

Renders as a 3D model upload button. It opens the Assets dialog window in order to upload a 3D model file (or multiple files: the obj model format consists of obj, mtl and image texture files) or insert an existing 3D model into the space. Possible 3D model settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'model3d' String yes
#label 'Write some text' String yes
#description 'Write some text'. Rendered as placeholder. String yes
#required true or false Boolean yes
#file-extension ['obj', 'ply', 'dae'] Array yes
#help 'Write some text'. Rendered as help text. String yes

3D Model array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'model3d'
#caption Caption Text
#description Description Text
#scale Key value pairs. For example: ['#x' => 1, '#y' => 1, '#z' => 1]
#rotation Key value pairs. In degrees. For example: ['#x' => 90.0, '#y' => 45.0, '#z' => 0.0]
#model Array containing #uri #value and #uri #filetype keys and values. An *.obj file contains an additional entry for the *.mtl file.

Example:

$content['content-type-key'][0]['model-key']['#model'][0]['#uri']['#value']

$content['content-type-key'][0]['model-key']['#model'][0]['#uri']['#filetype']

Example for obj and mtl files:

$content['content-type-key'][0]['model-key']['#model'][0]['#uri']['#value']

$content['content-type-key'][0]['model-key']['#model'][1]['#uri']['#value']

$content['content-type-key'][0]['model-key']['#model'][0]['#uri']['#filetype']

$content['content-type-key'][0]['model-key']['#model'][1]['#uri']['#filetype']

Position

Renders as a button. It opens a dialog window in order to position, attach and detach content items (of a certain content type). The content positions and content item references can be inserted into a space. Possible position settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'position' String yes
#label 'Write some text' String yes
#required true or false Boolean yes
#maxnumber Between 1 and infinite Integer yes
#content-type-reference 'name-of-content-type' String yes
#field-reference 'name-of-field' String no
#help 'Write some text'. Rendered as help text. String yes

#content-type-reference specifies WHAT should be positioned and attached in space. The content type you specify must exist in your theme (in config.php file). Examples for content types are: text-notes, blog-posts, images, videos, etc.

#field-reference specifies WHERE content items should be positioned and attached. The field name must exist in your theme (in config.php file) and within the same content type as the position field is in use. Examples for field references are: photo-sphere, video-sphere, 3d-model, etc. #field-reference is optional. If it is not specified, a grid is shown instead.

Position array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'position'
#caption Caption Text
#description Description Text
#positions Array entries for positioned content items with key value pairs for #position (#x, #y, #z), #scale (#x, #y, #z), #rotation (#x, #y, #z), #content-id and referenced #content with its corresponding values.

Example:

$content['content-type-key'][0]['position-key']['#positions'][0]['#position']['#x']

$content['content-type-key'][0]['position-key']['#positions'][0]['#position']['#y']

$content['content-type-key'][0]['position-key']['#positions'][0]['#position']['#z']

$content['content-type-key'][0]['position-key']['#positions'][0]['#content-id']

$content['content-type-key'][0]['position-key']['#positions'][..]['#position']['#x']

Example: a reference to an image has been positioned:

$content['content-type-key'][0]['position-key']['#positions'][0]['#content']['image-key']['#width']

$content['content-type-key'][0]['position-key']['#positions'][0]['#content']['image-key']['#height']

$content['content-type-key'][0]['position-key']['#positions'][0]['#content']['image-key']['#caption']

$content['content-type-key'][0]['position-key']['#positions'][0]['#content']['image-key']['#description']

$content['content-type-key'][0]['position-key']['#positions'][0]['#content']['image-key']['#uri']['#value']

Rotation

Renders as a button. It opens a dialog window in order to rotate content items (of a certain content type). The content rotation can be inserted into a space. Possible rotation settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'rotation' String yes
#label 'Write some text' String yes
#required true or false Boolean yes
#field-reference 'name-of-field' String yes
#help 'Write some text'. Rendered as help text. String yes

#field-reference specifies the field name on which to enable the setting of a rotation. The field name must exist in your theme (in config.php file) and within the same content type as the rotation field is in use. Supported field types are: video, videosphere, photosphere, image, model3d.

Rotation array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'rotation'
#rotation Array entries with key value pairs for rotation (#x, #y, #z).

Example:

$content['content-type-key'][0]['rotation-key']['#rotation']['#x']

$content['content-type-key'][0]['rotation-key']['#rotation']['#y']

$content['content-type-key'][0]['rotation-key']['#rotation']['#z']

Space Reference

Renders as an HTML select input field. Possible space reference settings for config.php:

Setting Value(s) Value Type Mandatory
#type 'space-reference' String yes
#label 'Write some text' String yes
#required true or false Boolean yes
#published true or false. List only published spaces or all spaces. String yes
#help 'Write some text'. Rendered as help text. String yes

Space Reference array keys for accessing content in a View Template (for example: scene.blade.php):

Array Key Description
#id Field ID Number
#content-id Content ID Number
#type 'space-reference'
#space-title The space title
#space-uri The space URI
#space-id The space id

Example:

$content['content-type-key'][0]['space-reference-key']['#space-title']