Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
SiteProcessor
The Site
fetches data from the site configuration.
Options
as
as
-
- Type
- string
- Required
- false
- Default
- "site"
The variable name to be used in the Fluid template.
Example: Output some data from the site configuration
Please see also About the examples.
TypoScript
Using the Site
the following scenario is possible:
tt_content {
examples_dataprocsite =< lib.contentElement
examples_dataprocsite {
templateName = DataProcSite
dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\SiteProcessor
dataProcessing.10 {
as = site
}
}
}
Copied!
The Fluid template
In the Fluid template the properties of the site configuration can be accessed:
<html data-namespace-typo3-fluid="true" xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<h2>Data in variable site</h2>
<f:debug inline="true">{site}</f:debug>
<h2>Output</h2>
<p>Base url: <f:link.page pageUid="{site.rootPageId}">{site.configuration.base}</f:link.page></p>
</html>
Copied!
Output
The array now contains the information from the site configuration: