confval¶
This page
Summary¶
.. confval::
is the directive.
:confval:
is a text role to create a reference to the description.
Examples:
A page where sphinx-doc.org uses the
:confval
directive: https://www.sphinx-doc.org/en/master/usage/configuration.html • rst-sourceSee long list of automatic entries for "configuration value" in the index: https://www.sphinx-doc.org/en/master/genindex.html#C
Demo 1¶
Source:
.. confval:: mr_pommeroy
:default: Happy new year, Sophie!
:type: shy
Participant of Miss Sophie's birthday party.
Result:
- mr_pommeroy¶
- Default
Happy new year, Sophie!
- Type
shy
Participant of Miss Sophie's birthday party.
You can easily link to the description of a 'confval' by means of the
:confval:
text role. Example: Here is a link to mr_pommeroy
.
Demo 2¶
Adapted from the TypoScript Reference Manual:
- align¶
- Type
align
- Default
left
- Possible
left | center | right
Decides about alignment.
Example:
10.align = right
- boolean¶
- Type
boolean
- Possible
1 | 0
1 means TRUE and 0 means FALSE.
Everything else is evaluated to one of these values by PHP: Non-empty strings (except
0
[zero]) are treated as TRUE, empty strings are evaluated to FALSE.Examples:
dummy.enable = 0 # false, preferred notation dummy.enable = 1 # true, preferred notation dummy.enable = # false, because the value is empty
- case¶
- Type
case
- Possible
Value
Effect
upper
Convert all letters of the string to upper case
lower
Convert all letters of the string to lower case
capitalize
Uppercase the first character of each word in the string
ucfirst
Convert the first letter of the string to upper case
lcfirst
Convert the first letter of the string to lower case
uppercamelcase
Convert underscored
upper_camel_case
toUpperCamelCase
lowercamelcase
Convert underscored
lower_camel_case
tolowerCamelCase
Do a case conversion.
Example code:
10 = TEXT 10.value = Hello world! 10.case = upper
Result:
HELLO WORLD!
Demo 3 - addRecord¶
- addRecord¶
- Type
array
- Scope
fieldControl
- Types
Control button to directly add a related record. Leaves the current view and opens a new form to add a new record. On 'Save and close', the record is directly selected as referenced element in the
type='group'
field. If multiple tables are allowed, the first table from the allowed list is selected, if no specifictable
option is given.Note
The add record control is disabled by default, enable it if needed. It is shown below the
edit popup
control if not changed bybelow
orafter
settings.