URLs
Modify all URLs
Kirby::plugin('my/urls', [
'components' => [
'url' => function (Kirby $kirby, string|null $path = null, array|string|null $options = null): string {
$original = $kirby->nativeComponent('url');
return $original($kirby, $path, $options);
}
]
]);
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $kirby * | Kirby\Cms\App |
– | |
| $path | string|null |
null |
URL path |
| $options | array|string|null |
null |
Array of options for the Uri class |
Return type
string