Attention
TYPO3 v6 has reached its end-of-life April 18th, 2017 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is strongly recommended updating your project.
TYPE: "none"¶
This type will just show the value of the field in the backend. The field is not editable.
Property details¶
format¶
Key
format
Datatype
string (keyword) + array
Description
The value of a none-type fields is normally displayed as is.
It is however possible to format it using this property. The
following keywords are available, some having sub-properties.
Sub-properties are called with the format.
keyword
(note the trailing dot), which is itself an array.
- date
Formats the value of the field as a date. The default formatting uses PHP's
date()
function andd-m-Y
as a format. Possible options are:- strftime
(boolean) If true,
strftime()
is used insteaddate()
for formatting.- option
(string) Format string (i.e.
Y-m-d
or%x
, etc.).- appendAge
(boolean) If true, the age of the value is appended is appended to the formatted output.
- datetime
Formats the values using PHP's
date()
function andH:i d-m-Y
as a format.- time
Formats the values using PHP's
date()
function andH:i
as a format.- timesec
Formats the values using PHP's
date()
function andH:i:s
as a format.- year
Formats the values using PHP's
date()
function andY
as a format.- int
Formats the values as an integer using PHP's
sprintf()
in various bases. The default base is decimal (dec
). The base is defined as an option:- base
(string) Defines the base of the value. Possible bases are "dec", "hex", "HEX", "oct" and "bin".
- float
Formats the values as an real number using PHP's
sprintf()
and the%f
marker. The number of decimals is an option:- precision
(integer) Defines the number of decimals to use (maximum is 10, default is 2).
- number
Formats the values as a number using PHP's
sprintf()
. The format to use is an option:- option
(string) A format definition according to PHP's
sprintf()
function (see the reference).
- md5
Returns the md5 hash of the values.
- filesize
Formats the values as file size using
\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize()
. One option exists:- appendByteSize
(boolean) If true, the original value is appended to the formatted string (between brackets).
- user
Calls a user-defined function to format the values. The only option is the reference to the function:
- userFunc
(string) Reference to the user-defined function. The function receives the field configuration and the field's value as parameters.
Examples
'format' => 'date'
'format.' => array(
'strftime' => TRUE,
'option' => '%x'
)
'eval' => 'double2'
'format' => 'float'
'format.' => array(
'precision' => 8
)
pass_content¶
Key
pass_content
Datatype
boolean
Description
If set, then content from the field is directly outputted in the <div>
section. Otherwise the content will be passed through
htmlspecialchars()
and possibly nl2br()
if there is configuration for rows.
Be careful to set this flag since it allows HTML from the field to be outputted on the page, thereby creating the possibility of XSS security holes.
rows¶
Key
rows
Datatype
integer
Description
If this value is greater than 1 the display of the non-editable
content will be shown in a <div>
area trying to simulate the
rows/columns known from a text-type element.