The new kirby 4 “link” field is great!
But the linked URLs in the content points to the URL-root, like <a href="/@/file/someid">
And the file is not found if Kirby is on the kirby-subdirectory like /my-subdomain/.
I change the link-type from URL to “file” and select the file, then this happens.
How can I change the given file-URL globally to a subdomain like /my-subdomain/@/file/abcdefg
When Kirby is installed on a subdomain?
The url setting in config.php don’t change this.
Ok, so the links work fine, but you want to render the standard url instead of the permalink? Then $field->permalinksToUrls() | Kirby CMS to the rescue.
Thank you, works great. But if the Kirby is on a subdirectory, you always have to add the ->permalinksToUrls() for every writer-field. Otherwise those (great) function for linking sites or files don’t work correctly. On the root, all is fine.