Hello texnixe
Many thanks for this clarification. In this case I do not need panel support. Interestingly that toFile does not work on HTML-files. I managed to get it work, finally:
$file = $page->content()->contentfile();
$filename = $page->root()."/".$file;
if ($filecontent = readfile ($filename)) {
echo $filecontent;
}
Also refers to this earlier issue: Display content from HTML file on a page?