$kirbyTag->file()
Finds a file for the given path. The method first searches the file in the current parent, if it's a page. Afterwards it uses Kirby's global file finder.
$kirbyTag->file(string $path): Kirby\Cms\File|null
Parameters
| Name | Type | Default |
|---|---|---|
| $pathrequired | string |
no default value |
Return types
Kirby\Cms\Fileornull
This method modifies the existing $kirbytag object it is applied to and returns it again.