cb:languagePath
Resolves the
LLL:
path to the labels. language file of a
Content Block. Use it together with
f: to build a full
translation key without having to hardcode the extension path.
Warning
This ViewHelper only works inside the template of a Content Block. It
resolves the current Content Block via the
data._ or
settings._ template variable. If neither
variable is available and
name
is not given explicitly, an
exception is thrown. An exception is also thrown if the resolved
Content Block is not registered.
Arguments
| Name | Type | Default | Required |
|---|---|---|---|
| string |
-
- Type
- string
The vendor/package name of the Content Block (
vendor/). If not set, the current Content Block is resolved automatically.name
Examples
Default usage
Inside the current Content Block's own template,
name
can be omitted.
<f:translate key="{cb:languagePath()}:header"/>
Explicit Content Block name
<f:translate key="{cb:languagePath(name: 'vendor/name')}:header"/>