$file->diruri()

Returns the relative path for the file

  • since: Kirby 2.3.0
  • return (string)

Example:

echo $page->file()->diruri();

Result:

1-projects/2-project-b/forrest.jpg