Base ViewHelper <f:base>

Deprecated since version TYPO3 v11.5

The <f:base> ViewHelper is not suitable in almost all use cases and has been deprecated: In most cases the PageRenderer takes care of the main <head> markup, directly, or indirectly via TypoScript config.baseURL.

ViewHelper which creates a <base href="..."></base> tag.

The Base URI is taken from the current request.

Migration

If the ViewHelper is still needed, copy TYPO3\CMS\Fluid\ViewHelpers\BaseViewHelper to the consuming extension, giving the ViewHelper a happy life in an extension specific namespace.

Examples

Example:

<f:base />
Copied!

Output:

<base href="http://yourdomain.tld/" />
Copied!

Depending on your domain.

Source code

Go to the source code of this ViewHelper: BaseViewHelper.php (GitHub).