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 v11 here: TYPO3 ELTS.
Base ViewHelper <f:base>
Deprecated since version TYPO3 v11.5
The <f:
ViewHelper is not suitable in almost all use cases
and has been deprecated: In most cases the Page
takes care of the
main <head>
markup, directly, or indirectly via TypoScript config.
.
ViewHelper which creates a <base href="..."></
tag.
The Base URI is taken from the current request.
Migration
If the ViewHelper is still needed, copy
\TYPO3\
to the consuming extension,
giving the ViewHelper a happy life in an extension specific namespace.
Examples
Example:
<f:base />
Output:
<base href="http://yourdomain.tld/" />
Depending on your domain.
Source code
Go to the source code of this ViewHelper: BaseViewHelper.php (GitHub).
Note
<f:
has no arguments.