I’m having a problem with paths to images & files when I call $page->files() in my templates. They all seem to be absolute paths from my computer (/Users/name/work/kirby) rather than starting from the root of my virtual server (http://dev.kirbytest.de). Is there some configuration I need to set up to fix this? Because I seem to have missed it.
no unfortunately $page->files() gives me /Users/name/work/kirby/content/home-section/top-section/dino.jpg and then calling url() on the single file gives me nothing.
<?php foreach(page('home-section')->children()->invisible() as $home_section):
$file = $home_section->files();
echo $file; // this outputs /Users/name/work/kirby/content/home-section/top-section/dino.jpg
echo $file->url(); // this fails silently
endforeach; ?>