The This can be implemented as a file object method, too—
kirby()->set('file::method', 'safeUrl', function ($file) {
return $file->page()->url() . '/' . $file->filename();
};
Untested, but should make this a little cleaner in your templates!
The This can be implemented as a file object method, too—
kirby()->set('file::method', 'safeUrl', function ($file) {
return $file->page()->url() . '/' . $file->filename();
};
Untested, but should make this a little cleaner in your templates!