Appearance
Theme Domain Specific Language
Chocobrain's Theme Domain Specific Language (TDSL) allows Theme designers to configure input fields inside the Templates of section, website or page. Using these fields Content managers provide the content to be rendered by the SectionTemplate and are able to make design adjustments Theme designers see fit.
Moreover Theme designers can configure presets to provide default content right on creation of website, page or section. By defining Page Generators on PageTemplates Theme designers can even define which sections to be created on page creation. Independent definition of presets and generators allows Content managers to select any combination of them.
Define with schema
Each SectionTemplate must contain a schema
, which needs to be valid JSON put into the slot of a Liquid tag schema
and needs to adhere to following API.
Minimum required fields of schema
block depend on the context: schema_name
needs to be provided always, but css_class
and tag
can only be provided on SectionTemplates.
- Required content on SectionTemplate:JSON
{% schema %} { "schema_name": "my_schema_name", "css_class": "my_classes", "tag": "div" } {% endschema %}
- Required content on website:
JSON{% schema %} { "schema_name": "website" } {% endschema %}
schema_name
- Type:
string
- Allowed characters: A-Za-z0-9_
- Description: Name has to be unique amongst all SectionTemplates.
- Typical Usage:JSON
"schema_name": "my_schema_name"
css_class
- Type:
string
- Allowed characters: A-Za-z0-9-
- Description: Class content has to be unique amongst all SectionTemplates.
- Typical Usage:JSON
"css_class": "my_classes"
tag
- Type:
string
- Allowed values:
- div
- section
- article
- aside
- footer
- header
- Description: Rendered HTML of a section is wrapped by this HTML tag with class attribute containing the classes given via css_class field.
- Typical Usage:JSON
"tag": "div"
settings
- Type:
array of objects
- Description: Settings array inside the schema JSON consists of Setting objects, where each configures one field in the EditorSidebar inside the chocoBRAIN4-App.
blocks
- Type:
array of objects
- Description: The blocks array inside the schema JSON consists of Block objects, where each configures one field in the EditorSidebar inside the chocoBRAIN4-App.
presets
- Type:
array of objects
- Description: The presets array inside the schema JSON consists of Preset objects, where each configures one set of field presets and can be used to provide a url to a preview image. Beyond that a settings array can be provided with preset content which fills input fields on a section's creation.
Setting
Each setting object has at least three fields: name, label and kind.
- Typical usage: e.g. configuring a text fieldJSON
{% schema %} { "schema_name": "my_schema_name", "css_class": "my_classes", "tag": "div", "settings": [ { "name": "my_schema_setting_name", "label": "my_schema_setting_label", "kind": "text" } ] } {% endschema %}
name
- Type:
string
- Allowed characters: A-Za-z0-9
- Description: The name has to be unique amongst all schema settings of one SectionTemplates. It is use only internally to allocate inputs correctly despite change of the externally used label in the EditorSidebar.
- Typical Usage:JSON
"settings": [ { "name": "my_schema_setting_name", ... } ]
label
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: The label has to be unique amongst all schema settings of one SectionTemplate. It is use used extern in the EditorSidebar and can be adjusted without deleting already made inputs by Content managers in specific sections.
- Typical Usage:JSON
"settings": [ { "label": "my_schema_setting_label", ... } ]
kind
- Type:
string
- Allowed values:
- for primitive values: text, textarea, date, range, number, select, faq_item_tag_name
- for object references: rich_text, color, link, link_list, form, image
- Description: Depending on the kind further fields has to be configured.
- Typical Usage:JSON
"settings": [ { "kind": "text", ... } ]
text
- Allowed input values: UTF-8 characters without line breaks.
- For usage see text.
- Typical content:JSON
{ "name": "my_text_name", "label": "my text label", "kind": "text" }
textarea
- Allowed input values: UTF-8 characters with line breaks.
- For usage see textarea.
- Typical content:JSON
{ "name": "my_textarea_name", "label": "my textarea label", "kind": "textarea" }
rich_text
- Allowed input values: UTF-8 characters with line breaks and restricted formatting.
- For usage see richtext object.
- Typical content:JSON
{ "name": "my_richtext_name", "label": "my richtext label", "kind": "rich_text" }
date
- Allowed input values: A DOMString representing a date in YYYY-MM-DD format, or empty.
- For usage see date.
- Typical content:JSON
{ "name": "my_date_name", "label": "my date label", "kind": "date" }
color
- Allowed input values: Only selectable colors are those, that were created and named via the chocobrain Color Picker. Transparency is not included.
- For usage see color object.
- Typical content:JSON
{ "name": "my_color_name", "label": "my color label", "kind": "color" }
range
- Allowed input values: Numbers inside a given range only. The given step makes it impossible to choose other values and the allowed values are validated. The max value has to be reachable by a multiple in whole numbers of step starting from the min value.
- Additional required setting fields: min, max and step.
- For usage see range.
- Typical content:JSON
{ "name": "my_range_name", "label": "my range label", "kind": "range", "min": 0, "max": 1200, "step": 10 }
number
- Allowed input values: Numbers inside a given range only. The given step is only for input convenience and is not validated.
- Additional required setting fields: min, max and step.
- For usage see number.
- Typical content:JSON
{ "name": "my_number_name", "label": "my number label", "kind": "number", "min": 0, "max": 1000, "step": 10 }
link
- Allowed input values: link object
- For usage see link object.
- Typical content:JSON
{ "name": "my_link_name", "label": "my link label", "kind": "link" }
link_list
- Allowed input values: link_list object
- For usage see link_list object
- Typical content:JSON
{ "name": "my_link_list_name", "label": "my link_list label", "kind": "link_list" }
form
- Allowed input values: form object
- For usage see form object
- Typical content:JSON
{ "name": "my_form_name", "label": "my form label", "kind": "form" }
image
- Allowed input values: image object
- For usage see image object
- Typical content:JSON
{ "name": "my_image_name", "label": "my image label", "kind": "image" }
select
- Possible input values: the given option values and
nil
for no user input - Additional required setting fields:
options
, which is an array of objects, where each option object requires three fields:name
,label
,value
. For further information see options. - For usage see select
- Typical content:JSON
{ "name": "my_select_name", "label": "my select label", "kind": "select", "options": [ { "name": "my_select_name_option_1", "label": "my select name option 1", "value": "option_1" }, { "name": "my_select_name_option_2", "label": "my select name option 2", "value": "option_2" } ] }
faq_item_tag_name
- Possible input values: system generated select field for all tags on Faq items.
- For usage see faq_item_tag_name
- Typical content:JSON
{ "name": "my_faq_item_tag_name_name", "label": "my faq_item_tag_name label", "kind": "faq_item_tag_name" }
min
- Allowed values: Positive numbers, smaller than max value.
- The setting objects range and number require it. The max value has to be reachable by a multiple in whole numbers of step starting from the min value.
- Typical content:JSON
{ ... "min": 0, ... }
max
- Allowed values: Positive numbers, greater than min value.
- The setting objects range and number require it. The max value has to be reachable by a multiple in whole numbers of step starting from the min value.
- Typical content:JSON
{ ... "max": 100, ... }
step
- Allowed values: Positive numbers.
- The setting objects range and number require it. The max value has to be reachable by a multiple in whole numbers of step starting from the min value.
- Typical content:JSON
{ ... "step": 5 }
options
- Type:
array of objects
- Description: Options array inside a setting of kind select consists of option objects, where each configures one row in the dropdown select-field in the EditorSidebar inside the chocoBRAIN4-App.
option
- Required fields:
name
,label
andvalue
. - The setting object select requires an array of options.
- Typical content:JSON
{ "name": "my_select_name", "label": "my select label", "kind": "select", "options": [ { "name": "my_select_name_option_1", "label": "my select name option 1", "value": "option_1" }, ... ] }
name
- Allowed characters: A-Za-z0-9
- Typical content:JSON
{ "name": "my_select_name_option_1", ... }
label
- Allowed characters: A-Za-z0-9:,-_()% and space
- Typical content:JSON
{ "label": "my select label (option 1)", ... }
value
- Allowed characters: A-Za-z0-9 and space
- Typical content:JSON
{ "value": "option-1", ... }
Block
- Type:
object
- Description: Each block consists of one or more Setting objects and the Content Manager can add multiple instances of them, only confined by the given limit.
- Required fields: name, label, limit, and settings
- Typical usage: e.g. configuring a block with an image and a headlineJSON
{% schema %} { ... "blocks": [ { "name": "slider_slides", "label": "Slides", "limit": 20, "settings": [ { "name": "slide_image", "label": "Bild", "kind": "image" }, { "name": "slide_headline", "label": "Überschrift", "kind": "text" } ] } ] } {% endschema %}
name
- Type:
string
- Allowed characters: A-Za-z0-9
- Description: Name has to be unique amongst all block settings of one blocks array. It is used only internally to allocate inputs correctly despite change of the externally used label in the App's EditorSidebar.
- Typical Usage:JSON
"blocks": [ { "name": "my_schema_setting_name", ... } ]
label
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: label has to be unique amongst all block settings of one blocks array. It is use used extern in the App's EditorSidebar and can be adjusted without deleting already made inputs by Content managers in specific sections.
- Typical Usage:JSON
"blocks": [ { ... "label": "my_schema_setting_label", ... } ]
limit
- Type:
number
- Allowed range: 1+
- Description: limit is used to limit the maximum number of this Block that a Content Manager can create.
- Typical Usage:JSON
"blocks": [ { ... "limit": 5, ... } ]
settings
- Type:
array of objects
- Description: The settings array inside the schema JSON consists of Setting objects, of which each configures one field in the EditorSidebar inside the chocoBRAIN4-App.
- Typical Usage:JSON
"blocks": [ { ... "settings": [ { "name": "slide_image", "label": "Bild", "kind": "image" }, ... ] } ]
Usage of settings
Use section.settings.MY_TDSL_NAME
to reach content of TDSL-field of section or section.dynamic_blocks.MY_BLOCK_NAME[i].settings.MY_TDSL_NAME
to reach content of TDSL-field of block. Except for the TDSL-fields text
, textarea
, number
, range
and select
the corresponding object is returned.
Settings
text
- Type:
string
- Description: Contains the text string inserted into the corresponding TDSL-field in section, which is
nil
when the field is empty. - Typical Usage:
- Use for section heading, e.g. when
setting name
ismy_section_heading
.
HTML{%- if section.settings.my_section_heading -%} <h2> {{section.settings.my_section_heading}} </h2> {%- endif -%}
- Use for section heading, e.g. when
textarea
- Type:
string
- Description: Contains the textarea string inserted into the corresponding TDSL-field in section, which is
nil
when the field is empty and may contain\n
as line breaks which has to be replaced by<br>
in HTML by Liquid filternewline_to_br
. - Typical Usage:
- Use for multiline texts without formatting, e.g. a textarea named
my_textarea
.
HTML<p> {{section.settings.my_textrea | newline_to_br}} </p>
- Use for multiline texts without formatting, e.g. a textarea named
number
- Type:
number
- Description: Contains the number inserted into the corresponding TDSL-field in section, which is
nil
when the field is empty. The number has to be an integer. - Typical Usage:
- Use for input that needs to be a number, e.g. a number named
my_padding_in_px
.
HTML<div style="padding: {{section.settings.my_padding_in_px}}px;"> ... </div>
- Use for input that needs to be a number, e.g. a number named
range
- Type:
range
- Description: Contains the number selected via range field of corresponding TDSL-field in section, which is
nil
when the field has never been used. Main difference to a number field is the draggable button to determine its value in Editor sidebar and that it cannot be reset to its original valuenil
by Content managers. A reset or delete results in the lowest possible value as inserted into the min value field. - Typical Usage:
- Use for input that needs to be a number, e.g. a number named
my_margin_in_px
.
HTML<div style="margin: {{section.settings.my_margin_in_px}}px;"> ... </div>
- Use for input that needs to be a number, e.g. a number named
select
- Type:
string
- Description: Contains the value string of the corresponding select option of the TDSL-field in section, which is
nil
when no option was selected. - Typical Usage:
- Use for input that needs to be one of several values, e.g. a specific class for the select field named
margin_size_class
.
HTML<div class="{{margin_size_class}}"> ... </div>
- Use for input that needs to be one of several values, e.g. a specific class for the select field named
date
Type:
string
Description: Contains the a string representing the date in the format YYYY-MM-DD or is
nil
when field is empty. the string can be reformatted using Liquid filterdate
.Typical Usage:
- Use for input that needs to be a date, e.g. a date field named
my_date
.
HTML<p> {{my_date | date: "%e.%m.%Y"}} </p>
- Use for input that needs to be a date, e.g. a date field named
faq_item_tag_name
- Type:
array of objects
- Description: Contains array of all faq item objects with selected tag.
- Typical Usage:
- Use to show only a subset of faq_items on a special topic.
HTML{%- for faq_item in section.settings.my_faq_item_tag_name_name -%} <div> <p> {{ faq_item.question_plain }} </p> {{ faq_item.answer_html }} </div> {% endif %}
rich_text
See richtext object
image
See image object
link
See link object.
link_list
See link_list object.
color
See color object
form
See form object
dynamic_blocks
- Type:
list of arrays
- Description: Contains a list of
arrays of content blocks
added by Content managers on basis of a dynamic_block defined by the Theme designer. A specificarray of content blocks
is called bysection.dynamic_blocks.MY_BLOCK_NAME
and contains a Setting object with all settings of the block as defined by the Theme designer and inserted by Content managers. - Typical Usage:
- Use for gallery of images, e.g. when
block name
ismy_gallery_block
andsetting name
ismy_gallery_image
.
LIQUID{% for dynamic_content_block in section.dynamic_blocks.MY_GALLERY_BLOCK %} {% assign my_image_object = dynamic_content_block.settings.MY_GALLERY_IMAGE %} ... {% endfor %}
- Use for gallery of images, e.g. when
Preset
Each preset object has at least three fields: name, label and preview_image_url. Optionally a settings array can be provided with preset content which fills input fields on a section's creation. In similar fashion a blocks array can be which creates blocks with their own settings on a section's creation. For object fields a set of preset objects are provided to choose from. Furthermore Section Template presets can be assigned to multiple predefined categories of each category group design_categories and usage_categories.
- Typical usage: making a preview image available and defining preset contents in preset's settings arrayJSON
{% schema %} { "schema_name": "my_schema_name", "css_class": "my_classes", "tag": "div", "settings": [ ... ], "blocks": [ ... ], "presets": [ { "name": "my_schema_preset_name", "label": "my_schema_preset_label", "preview_image_url": "https://www.mypics.de/my_image.jpg", "design_categories": ["basic", "image"], "usage_categories": ["products", "pricing"], "settings": [ { "name": "text_setting_name", "default": "Beliebiger Inhalt eines primitiven Textfeldes." }, { "name": "image_setting_name", "default": "logo_4by3" }, { "name": "link_setting_name", "default": "intern_small", "generator_default": "generated_link_name" } ], "blocks": [ { "name":"block_type_name1", "settings": [ { "name":"other_text_setting_name", "default":"Beliebiger Inhalt eines primitiven Textfeldes." } ] }, { "name":"block_type_name1" }, { "name":"block_type_name2", "settings": [ { "name":"other_image_setting_name", "default":"logo_4by3" } ] } ] } ] } {% endschema %}
name
- Type:
string
- Allowed characters: A-Za-z0-9
- Description: The name has to be unique amongst all presets of one SectionTemplate. It is used only internally to allocate inputs correctly despite changes of the externally used label and preview_image_url in the EditorSidebar.
- Typical Usage:JSON
"presets": [ { "name": "my_preset_name", ... } ]
label
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: The label has to be unique amongst all presets of one SectionTemplate. It is use used externaly in the EditorSidebar and can be changed anytime.
- Typical Usage:JSON
"presets": [ { "label": "my_preset_label", ... } ]
preview_image_url
- Type:
url
- Description: Url must link to an available image.
- Typical Usage:JSON
"presets": [ { "preview_image_url": "https://www.mypics.de/my_image.jpg", ... } ]
design_categories
- Type:
array of strings
- Description: Only available on section template [presets].Array of strings has to contain one or more of predefined values to give users easier overview of existing section templates..
- Typical Usage:JSON
"presets": [ { "design_categories": ["basic", "image"], ... } ]
- Allowed values:
- basic
- text
- image
- video
- button
- form
- list
- hero
- header
- footer
- other
usage_categories
- Type:
array of strings
- Description: Only available on section template [presets].Array of strings has to contain one or more of predefined values to give users easier overview of existing section templates..
- Typical Usage:JSON
"presets": [ { "usage_categories": ["products", "pricing"], ... } ]
- Allowed values:
- problems
- products
- processes
- features
- benefits
- team
- testimonials
- numbers
- logos
- pricing
- faqs
- contact
- article
- recruiting
- overview
settings (presets)
- Type:
array of objects
- Description: Preset settings array inside presets of schema JSON consists of preset setting objects, where each fills one setting field.
- Typical Usage:JSON
"presets": [ { ... "settings": [ { "name":"text_setting_name", "default":"Beliebiger Inhalt eines primitiven Textfeldes." }, { "name":"image_setting_name", "default":"logo_4by3" }, ... ] ... } ]
setting (preset)
Each preset setting object has name and default field.
- Typical Usage:JSON
"presets": [ { ... "settings": [ { "name":"text_setting_name", "default":"Beliebiger Inhalt eines primitiven Textfeldes." }, { "name":"text_setting_link", "default":"intern_small", "generator_default":"name of link defined in website_generator" }, ... ] ... } ]
name (preset)
Name must correspond with name of a defined setting.
generator_default
Generator default are only available on fields od type link and link_list. The used value has to be name of link defined in website_generator.
default
Default value can either be arbitrary values for primitive fields, e.g. text or number, or a set of predefined preset object names, e.g. link or image. For a comprehensive list of available kinds see setting's kind.
Predefined constant objects for usage
These preset objects are only available through presets and its content cannot change. They represent dummy content which is important to show the typical Layout and Design of sections, pages and websites, but is not thought of to be of any use on published websites.
- faq_items with faq_item_tag_names:
- Preset-Tag1
- Preset-Tag2
- Preset-Tag3
- image:
- general_5by1
- general_3by1
- general_16by9
- general_1by1
- general_9by16
- person_16by9
- person_1by1
- person_9by16
- logo_16by9
- logo_1by1
- logo_9by16
- rich_text:
- lorem_xsmall
- lorem_small
- lorem_medium
- lorem_large
- lorem_xlarge
- list_small
- list_medium
- list_large
- lorem_with_headings_small
- lorem_with_headings_medium
- lorem_with_headings_large
- links:
- intern_small
- extern_medium
- link_lists:
- level1_small
- level1_large
- level2_small
- level2_large
- level3_small
- level3_large
Predefined modifiable objects for usage
These preset objects are not only available through presets but also for Content managers, which can even change their content. They represent prebuilt content which is thought to be valuable as such on websites, at least partly.
- color:
- primary
- primary_hover
- secondary
- secondary_hover
- black
- white
- gray_light
- gray_medium
- gray_dark
- forms:
- general_medium
- download_small
- download_large
- recruiting_small
- recruiting_large
blocks (presets)
- Type:
array of objects
- Description: Preset blocks array inside presets of schema JSON consists of preset blocks objects, where each is used to create one block. Each block has its own settings, which are filled by values given by a settings array inside the preset block. Name of preset block has to be one of the defined schema block.
- Typical Usage:JSON
"presets": [ { ... "blocks": [ { "name":"block_type_name1", "settings": [ { "name":"text_setting_name", "default":"Beliebiger Inhalt eines primitiven Textfeldes." }, { "name":"image_setting_name", "default":"logo_4by3" }, ... ] }, { "name":"block_type_name1", "settings": [ { "name":"text_setting_name", "default":"Andere Inhalt" }, { "name":"image_setting_name", "default":"logo_1by1" }, ... ] } ] ... } ]
block (preset)
Each preset block object has name and settings fields. Preset block settings
- Typical Usage:JSON
"presets": [ { ... "blocks": [ { "name": "block_type_name1", "settings": [ { "name":"text_setting_name", "default":"Beliebiger Inhalt eines primitiven Textfeldes." }, { "name":"image_setting_name", "default":"logo_4by3" }, ... ] } ... ] ... } ]
name (preset-block)
Name of preset block has to be one of defined schema blocks.
settings (preset-block)
Settings array contains fields which have to correspond to names of defined block settings. Apart from this they need to adhere to same rules as other preset settings.
Page Generator
Each page generator object has three fields: name, label and sections and can be added to PageTemplates. On page creation users can select one generator, which determines which page sections are created inside the newly created page.
- Typical usage: Create several sections on page creation.
JSON
{% schema %}
{
"schema_name": "my_schema_name",
"css_class": "my_classes",
...
"generators": [
{
"name": "my_generator_name",
"label": "my generator label",
"sections": [
{
"template": "section_template_schema_name",
"preset_name": "section_template_schema_preset_name"
},
{
"template": "section_template_schema_name",
"preset_name": "other_section_template_schema_preset_name"
},
{
"template": "other_section_template_schema_name",
"preset_name": "section_template_schema_preset_name_of_other"
}
]
}
]
}
{% endschema %}
name (page generator)
- Type:
string
- Allowed characters: A-Za-z0-9
- Description: The name has to be unique amongst all generators of one PageTemplate. It is used only internally to allocate inputs correctly despite changes of the externally used label.
- Typical Usage:JSON
"generators": [ { "name": "my_generator_name", ... } ]
label (page generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: The label has to be unique amongst all generators of one PageTemplate. It is use used externally in the EditorSidebar and can be changed anytime.
- Typical Usage:JSON
"generators": [ { "label": "my generator label", ... } ]
sections (page generator)
- Type:
array of objects
- Description: Sections array inside generators of schema JSON consists of generator section objects, where each is used to define one section to be created.
- Typical Usage:JSON
"generators": [ { "sections": [ { "template": "section_template_schema_name", "preset_name": "section_template_schema_preset_name" }, { "template": "other_section_template_schema_name", "preset_name": "section_template_schema_preset_name_of_other" }, ... ] } ]
section (page generator)
- Type:
object
- Description: Each generator section object has template and preset_name field.
- Typical Usage:JSON
"generators": [ { "sections": [ { "template": "section_template_schema_name", "preset_name": "section_template_schema_preset_name" }, ... ] } ]
template (page generator)
Template field denominates one SectionTemplate by its schema name, hence, has to correspond with the name of a defined SectionTemplate.
preset_name (page generator)
Preset_name field denominates one [preset] as defined in its SectionTemplate, denominated in template field.
Website Generator
The website's template Layout can contain multiple website genertaors.Each website generator object has up to 8 fields: name, label, header_sections, footer_sections, pages, links, link_lists and forms.
On website creation users can select one generator, which determines which header and footer sections, and which pages are created inside the newly created website. For each created page the given page generator name allows the created pages to contain page sections itself. TDSL fields can be filled with predefined preset objects or with links and link_lists defined inside website generator itself.
- Typical usage: Create sections and pages with sections on on website creation.
JSON
{% schema %}
{
"schema_name": "my_layout_schema_name",
...
"generators": [
{
"name": "my_generator_name",
"label": "my generator label",
"header_sections": [
{
"template": "section_template_schema_name",
"preset_name": "section_template_schema_preset_name"
}
],
"footer_sections": [
{
"template": "section_template_schema_name",
"preset_name": "section_template_schema_preset_name"
}
],
"pages": [
{
"page_name": "my page name 2",
"page_path": "/my_page_path2",
"template": "start",
"generator_name": "marketing"
},
{
"page_name": "my page name",
"page_path": "/my_page_path",
"template": "product",
"preset_name": "product_preset_name",
"generator_name": "product_generator_name"
}
],
"links": [
{
"name": "link to my page name",
"page_name": "my page name",
"text": "Look at my page"
}
],
"link_lists": [
{
"name": "my link_list name",
"link_list_children": [
{
"text": "Look at my page",
"page_name": "my page name"
},
{
"text": "Dropdown menu label",
"link_list_children": [ ... ]
}
]
}
],
"forms": [
{
"name": "download_small",
"page_name": "my page name"
}
]
}
]
}
{% endschema %}
name (website generator)
- Type:
string
- Allowed characters: A-Za-z0-9
- Description: The name has to be unique amongst all generators of Layout. It is used only internally to allocate inputs correctly despite changes of the externally used label.
- Typical Usage:JSON
"generators": [ { "name": "my_generator_name", ... } ]
label (website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: The label has to be unique amongst all generators of Layout. It is use used externally in the EditorSidebar and can be changed anytime.
- Typical Usage:JSON
"generators": [ { "label": "my generator label", ... } ]
header_sections (website generator)
- Type:
array of objects
- Description: Header sections array inside generators of schema JSON consists of generator section objects, identical to its usage on website generator, where each is used to define one section to be created on the header region of website.
- Typical Usage:JSON
"generators": [ { "header_sections": [ { "template": "section_template_schema_name", "preset_name": "section_template_schema_preset_name" } ] } ]
footer_sections (website generator)
- Type:
array of objects
- Description: Footer sections array inside generators of schema JSON consists of generator section objects, identical to its usage on page generator, where each is used to define one section to be created on the footer region of website.
- Typical Usage:JSON
"generators": [ { "footer_sections": [ { "template": "section_template_schema_name", "preset_name": "section_template_schema_preset_name" } ] } ]
pages (website generator)
- Type:
array of objects
- Description: Pages array inside website generator of schema JSON consists of generator page objects, where each is used to define one page to be created for website.
- Typical Usage:JSON
"generators": [ { "pages": [ { "page_name": "my page name", "page_path": "/my_page_path", "template": "start", "generator_name": "marketing" }, { "page_name": "my page name 2", "page_path": "/my_page_path2", "template": "product", "preset_name": "product_preset_name", "generator_name": "product_generator_name" } ] } ]
page (website generator)
- Type:
object
- Description: Each generator page object has page_name, page_path, template and generator_name field.
- Typical Usage:JSON
"generators": [ { "pages": [ { "page_name": "my page name", "page_path": "/my_page_path", "template": "start", "generator_name": "marketing" }, ... ] } ]
page_name (website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Page name has to be unique amongst all generator page of one [website_generator]. It is use used externally in the EditorSidebar and can be changed anytime.
- Typical Usage:JSON
"pages": [ { "page_name": "my page name", ... } ]
page_path (website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-
- Description: Page path has to be unique amongst all generator page of one [website_generator].
- Typical Usage:JSON
"pages": [ { "page_path": "/my_page_path", ... } ]
template (in pages of website generator)
- Type:
string
- Allowed values: One of in Layout defined page_template names.
- Description: Template field denominates one PageTemplate by its schema name, hence, has to correspond with the name of a defined PageTemplate, see page kinds.
- Typical Usage:JSON
"pages": [ { "template": "start", ... } ]
generator_name (website generator)
- Type:
string
- Allowed values: One of in named page_template defined page generators.
- Description: Generator name field denominates one generator of PageTemplate by its page generator, hence, has to correspond with the name of a defined page generator.
- Typical Usage:JSON
"generators": [ { "generator_name": "marketing", ... } ]
preset_name (website generator)
- Type:
string
- Allowed values: One of in named PageTemplate defined page presets.
- Description: Preset name field denominates one preset of PageTemplate by its preset_name, hence, has to correspond with the name of a defined page preset.
- Typical Usage:JSON
"generators": [ { "preset_name": "any_preset_name_of_page_template", ... } ]
links (website generator)
- Type:
array of objects
- Description: Links array inside website generator of schema JSON consists of generator link objects, where each is used to define one link to be created for website.
- Typical Usage:JSON
"generators": [ { ... "links": [ { "name": "link to my page name", "page_name": "my page name", "text": "Look at my page" }, { "name": "link to my page name 2", "page_name": "my page name 2", "text": "Look at my other page" } ] } ]
link (website generator)
- Type:
object
- Description: Each generator link object has name, page_name and text field.
- Typical Usage:JSON
"generators": [ { ... "links": [ { "name": "link to my page name", "page_name": "my page name", "text": "Look at my page" } ] } ]
name (link in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Name has to be unique amongst all generator links of one [website_generator]. It is used externally in the EditorSidebar and can be changed anytime. Furthermore, it is used as handle referenced in generator_default field of TDSL fields of type link.
- Typical Usage:JSON
"links": [ { "name": "link to my page name", ... } ]
page_name (link in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Page_name has to be name of a defined generator page inside same website_generator. It is used to define its link target page to be one of generated pages during website generation.
- Typical Usage:JSON
"links": [ { "page_name": "my page name", ... } ]
text (link in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Text can be an arbitrary string. It is used as text content and for build of title of generated link.
- Typical Usage:JSON
"links": [ { "text": "Look at my page", ... } ]
link_lists (website generator)
- Type:
array of objects
- Description: Link_lists array inside website generator of schema JSON consists of generator link_list objects, where each is used to define one link_list to be created for website.
- Typical Usage:JSON
"generators": [ { ... "link_lists": [ { "name": "link to my page name", "link_list_children": [ { "text": "Look at my main level page", "page_name": "my page name" }, { "text": "Dropdown menu label", "link_list_children": [ { "text": "Look at my nested page", "page_name": "my page name" }, { "text": "Look at my other nested page", "page_name": "my page name" } ] } ] } ] } ]
link_list (website generator)
- Type:
object
- Description: Each generator link_list object has name and link_list_children field. Name is used for internal naming of generated link_list object and link_list_children contains links and nested link_list_children, up to 3 levels deep.
- Typical Usage:JSON
"generators": [ { ... "link_lists": [ { "name": "my link_list name", "link_list_children": [ ... ] } ] } ]
name (link_list in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Name has to be unique amongst all generator link_lists of one [website_generator]. It is used externally in the EditorSidebar and can be changed anytime. Furthermore, it is used as handle referenced in generator_default field of TDSL fields of type link_ist.
- Typical Usage:JSON
"link_lists": [ { "name": "my link_list name", ... } ]
link_list_children (link_list in website generator)
- Type:
array of objects
- Description: Link_list_children array inside website generator of schema JSON consists of multiple link_list_child objects, where each is used to define a link or a nested link_list to be created for website.
- Typical Usage:JSON
... "link_list_children": [ { "text": "Look at my main level page", "page_name": "my page name" }, { "text": "Dropdown menu label", "link_list_children": [ { "text": "Look at my nested page", "page_name": "my page name" }, { "text": "Look at my other nested page", "page_name": "my page name" } ] } ]
link_list_child (link_list in website generator)
- Type:
object
- Description: Link_list_child can define a link or a link_list. For definition of a link text and page_name, corresponding to a page defined in same website generator, have to be present. For definition of a link_list text and link_list_children have to be present. Hence, a single link_list_child must not contain page_name and link_list_children fields.
- Typical Usage:
- Defining a linkJSON
"link_list_children": [ { "text": "Look at my main level page", "page_name": "my page name" }, ... ]
- Defining a link_listJSON
"link_list_children": [ { "text": "Dropdown menu label", "link_list_children": [ ... ] }, ... ]
- Defining a link
text (link_list in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Text can be an arbitrary string. When field page_name is present it is used as text content and for build of title of generated link. When field link_list_children is present it is used as name content, which is also usually displayed as dropdown menu's label on rendered website.
- Typical Usage:JSON
"link_list_children": [ { "text": "Link text or Dropdown menu label", ... } ]
page_name (link_list in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Page_name has to be name of a defined generator page inside same website_generator. It is used to define its link target page to be one of generated pages during website generation.
- Typical Usage:JSON
"links": [ { "page_name": "my page name", ... } ]
forms (website generator)
- Type:
array of objects
- Description: Forms array inside website generator of schema JSON consists of generator form objects, where each is used to overwrite redirect target page of existing preset form.
- Typical Usage:JSON
"generators": [ { ... "forms": [ { "name": "download_small", "page_name": "my page name" } ] } ]
form (website generator)
- Type:
object
- Description: Each form has name, which has to be one of existing preset form, and page_name, which has to be one of generated pages.
name (forms in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Name has to be one of existing preset form.
page_name (forms in website generator)
- Type:
string
- Allowed characters: A-Za-z0-9+-; and single white-space inside
- Description: Page_name has to be one of generated pages. The corresponsing page is used to overwrite redirect target page of corresponding preset_form.