abe tags can own many attributes.
For example the type text, some are required and other are optional:
{{abe type='text' key='text_key'}}
type
and key
are always required for all content type.
- tab
- key
- type
- autocomplete
- desc
- display
- editable
- max-length
- min-length
- source
- duplicate
- reload
- required
- visible
- order
- filetype
- file
- locale
- prefill
- prefill-quantity
- value
Default: "default"
tab="NameOfTheTab"
Html input will be displayed into the tab NameOfTheTab
.
Allowed:
- CamelCase
- Underscore
- Spaces
- Special charactères
Default: ""
key="keyData"
The key used into json file.
Allowed:
- CamelCase
- Underscore
- Dot
Examples:
{{abe type='text' key='title'}}
{
"title": "value"
}
{{abe type='text' key='blog.title'}}
{
"blog": {
"title": "value"
}
}
You can use dot json for keys the result will create json value when the data is saved
mypage.content.title.value
as key will output
{"mypage": {"content": {"title": {"value": ""}}}}
Default: "text"
type="text"
Result:
Look at all abe type here
Default: null
autocomplete="true"
JSON example for autocomplete:
[
{
"id": 1,
"name": "test 1",
"lang": "de"
},
{
"id": 2,
"name": "test 2",
"lang": "fr"
},
{
"id": 3,
"name": "test 3",
"lang": "es"
}
]
For Abe type data, display input form autocomplete into admin.
Default: ""
desc="some description for the contributor"
The admin description over the input.
Allowed:
- CamelCase
- Underscore
- Spaces
- Special charactères
Default: null
display="variable"
For Abe type data (autocomplete true or false).
Example:
display="{{name}}"
JSON:
[
{
"id": 1,
"name": "test 1",
"lang": "de"
},
{
"id": 2,
"name": "test 2",
"lang": "fr"
},
{
"id": 3,
"name": "test 3",
"lang": "es"
}
]
The autocomplete value visible under the input will use name
from JSON:
- test 1
- test 2
- test 3
Multiple variables are allowed for example with our JSON:
display="{{name}} - {{lang}}"
- test 1 - de
- test 2 - fr
- test 3 - es
Default: true
editable="true"
If editable true user can change the value, if not abe will set the values.
Default: null
max-length="3"
For Abe type data, array max selection.
Default: 0
min-length="1"
For Abe type data, array min selection (if required).
Default: null
source="[ source type ]"
See abe type data.
Default: true
duplicate="true"
If set to false, when user duplicate a post. The value will not be duplicate into the new post.
Example:
{{abe type='text' key='title' duplicate="false"}}
JSON before duplicate:
{
"abe_meta": {
"template": "autocomplete",
"link": "/test.html",
"date": "2016-12-15T16:46:22.946Z",
},
"title": "test"
}
JSON after duplicate:
Value of title is not filled after duplicate the post with name test-2.html
.
{
"abe_meta": {
"template": "autocomplete",
"link": "/test-2.html",
"date": "2016-12-15T16:46:22.946Z",
},
"title": ""
}
Default: false
reload="true"
If reload true, on blur event on the input field the post preview will be reloaded.
Default: false
required="true"
If set to true user cannot publish the post without required field.
Example:
{{abe type="text" key="title" required="true"}}
if submited but empty.
Default: true
visible="true"
If visible set to false, the value will not be set into post page (but will be visible on the admin and set into the JSON file).
Default: 0
order="1"
To order the input in the admin:
{{abe type='text' key='title1' desc='title 1' order="2"}}
{{abe type='text' key='title2' desc='title 2' order="1"}}
title1
is added before on the template but without order the result on the admin is inversed.
Default: ""
filetype="image"
Default: ""
file="partial.html"
See abe import.
Default: ""
locale="fr"
Default: false
prefill="true"
For abe type data, if set to true will add default values.
On the admin side prefill add a reload
button on the right.
Default: null
prefill-quantity="3"
How many default values to prefill.
Default: none
value="default text value"
Add a default value inside input, if the input value changes the default value won't be used anymore unless the value of the input become an empty string.