Document out of select field

Hi together, I have another Question. I’ve unexpected problems with getting the right path of a document out of an select field. The path is “right”(tommy.local:5757/home/termine/2015/ausschreibung.pdf) but the PDF is not found. Is there a special way for documents ?

  <?php if($page->ausschreibungoff()->bool()): ?>
         <a href="<?php echo $page->ausschreibung()->url(); ?>">Ausschreibung</a>
    <?php endif ?>

What is in $page->ausschreibung()? The filename? Then maybe the template should be sth like this

<?php if($file = $page->file($page->ausschreibung())) :?>
    <a href="<?php echo $file->url() ?>">Ausschreibung</a>
<?php endif ?>

Ok thank u tried it and got the message failed open stream, now I used the path and only echoed the filename now it works :slight_smile: thank u anyway !