Roadiz can handle many types of node-type fields. Here is a complete list:
Title, meta-title, meta-description and keywords are always available
since they are stored directly inside
NodesSources entity. Then you will be
sure to always have a title no matter the node-type you are using.
This following fields stores simple data in your custom node-source database table.
- Single-line text
- Date and time
- Basic text
- Markdown text
- Integer number
- Decimal number
- Single geographic coordinates
- JSON code
- CSS code
- Country code (ISO 3166-1 alpha-2)
- YAML code
Single geographic coordinates field stores its data in JSON format. Make sure you don’t have manually writen data in its input field.
To use Single geographic coordinates you must create a Google API Console account with Maps API v3 activated. Then, create a Browser key and paste it in “Google Client ID” parameter in Roadiz settings to enable geographic node-type fields. If you didn’t do it, a simple text input will be display instead of Roadiz Map Widget.
Virtual types do not really store data in node-source table. They display custom widgets in your editing page to link documents, nodes or custom-forms with your node-source.
- Nodes references
- Custom form
These fields types must be created with default values (comma separated) in order to display available default choices for “select-box” types:
- Single choice
- Multiple choices
- Children nodes
Children node field type is a special virtual field that will display a custom node-tree inside your editing page. You can add quick-create buttons by listing your node-types names in default values input, comma separated.
If you need a field to hold exactly the same data for all translations, you can set it as universal. For example for documents, numeric and boolean data that do not change from one language to another.
It will duplicate data at each save time from default translation to others. It will also hide the edit field from non-default translation to avoid confusion.
When you use YAML field type, you get an additional method to return your code already parsed.
If your field is named
data, your methods will be generated in your NSEntity as
getData()method will return your YAML code as string.
getDataAsObject()will return a mixed data,array or
stdObjectaccording to your code formatting. This method will throw a
\Symfony\Component\Yaml\Exception\ParseExceptionif your YAML code is not valid.