I want to output a string to processed HTML using two backups.
My typoscript is defined on a top-level page (the root page of my site) and is passed to all pages at lower levels.
Structure:
Normal file output:
The string comes from the TemplaVoila field (Page / Edit / Extended / MyField): field_copyright_name
To bring it to the desired point in the HTML output, there is a templaVoila mapping (Type: Typoscript Object Path) named: lib.copyright_name
The following typoscript does the following job:
lib.hint_copyright_name = COA
lib.hint_copyright_name.10 = TEXT
lib.hint_copyright_name.10 {
setCurrent.dataWrap = {field:field_copyright_name}
current = 1
}
This works for all pages at all levels, where the field (in the page properties) is not empty.
First reserve:
( , , 2), typoscript ( 1, , ). , . ?
- ( ), "Copyright by me".
" ", :
switchdefault_copyright_name = TEXT
switchdefault_copyright_name {
setCurrent.dataWrap = {field:field_copyright_name}
current = 1
override = "Copyright by me"
override.if.isFalse.field = field_copyright_name
}
lib.hint_copyright_name = COA
lib.hint_copyright_name.10 < switchdefault_copyright_name
" "?
EDIT:
:
setCurrent.data = {levelfield:-1, field_copyright_name, slide}
setCurrent.data = levelfield:-1, field_copyright_name, slide
setCurrent.dataWrap = {levelfield:-1, field_copyright_name, slide}
setCurrent.dataWrap = levelfield:-1, field_copyright_name, slide
- .