Working with the templates
Changed in version tt_address 9.1.0 / TYPO3 v13.3
You can use the site set to configure the template paths.
The following tutorials describe how to work best with the provided templates
Modify the templates
If you want to adopt the templates, copy the ones of tt_
to your site package extension (or to fileadmin if
you really need to ...) and provide the path in TypoScript.
# Use either constants or setup
# constants:
plugin.tx_ttaddress.view {
templateRootPath = path/to/your/tt-address-templates/Templates/
partialRootPath = path/to/your/tt-address-templates/Partials/
layoutRootPath = path/to/your/tt-address-templates/Layouts/
}
# or setup
plugin.tx_ttaddress.view {
templateRootPaths.10 = path/to/your/tt-address-templates/Templates/
partialRootPaths.10 = path/to/your/tt-address-templates/Partials/
layoutRootPaths.10 = path/to/your/tt-address-templates/Layouts
}
Copied!
Access to current content element data
The full data of the current content element can be accessed in the view by checking the variable content
.
<f:debug inline="1">{contentObjectData}</f:debug>
Copied!
Section in partial Address
To minimize code duplication the partial Partials/
includes often used parts of the template. Currently there are:
address
: The address itselfposition
: The position of the addresscontact
: All including contacts and the birthdaysocial
: All social links
To use one of the partial you just need to call
<f:render section="social" partial="Address" arguments="{_all}"/>
Copied!