Except, with the file list coming from a different page where all of the documents are stored instead of having them scattered through the pages (also there is a fair bit of overlap) I took a look at “hooks,” but I’m having trouble understanding how to use them. Any tips? thank you!
(sorry the indentation is gone, I can’t get the four space thing to work at the moment)
So, to get the link to point to the right place I have that relative path which works fine (but possibly isn’t best practice?), but it’s not retrieving the niceSize. This isn’t crucial, but would be nice.
You need to convert the filename to a file object:
$file = $page->file($pdf->filename());
It will have all properties like url and niceSize.
Please click the edit button of your post. I have fixed your code block syntax there and you can take a look at it (basically three backticks and in separate lines).