Reference

Guide

Url::toTemplateAsset()

Creates an absolute Url to a template asset if it exists. This is used in the css() and js() helpers

Url::toTemplateAsset(string $assetPath, string $extension): string|null

Parameters

Name Type Default Description
$assetPath string
$extension string

Return type

string|null

Source code

kirby/src/Cms/Url.php#L43