NormalizedUrl ViewHelper <core:normalizedUrl>
¶
Note
This ViewHelper is not available by default.
Import its namespace
{namespace core=TYPO3\CMS\Core\ViewHelpers\}
in the Fluid file or
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers/"
in the opening HTML tag.
Normalizes a path that uses EXT: syntax or an absolute URL to an absolute web path
Examples¶
Url:
<core:normalizedUrl pathOrUrl="https://foo.bar/img.jpg" />
Copied!
Output:
https://foo.bar/img.jpg
Copied!
Path:
<core:normalizedUrl pathOrUrl="EXT:core/Resources/Public/Images/typo3_black.svg" />
Copied!
Output:
/typo3/sysext/core/Resources/Public/Images/typo3_black.svg
Copied!
Source code¶
Go to the source code of this ViewHelper: NormalizedUrlViewHelper.php (GitHub).
Arguments¶
The following arguments are available for <core:normalizedUrl>
:
Name | Type | Default |
---|---|---|
string |
-
pathOrUrl
¶ -
- Type
- string
- Required
true
Absolute path to file using EXT: syntax or URL.