One-pager: Loading snippet by intended template breaks site


I am developing a one-pager right now and proceeded as described here:

But instead of using the uid, I want to get the snippet by using intendedTemplate(). But if I do that, the page doesn’t stop loading and only half of the content gets printed. With uid, everything works fine. Does anyone have an idea, what the problem might be?

Here is my homepage template: (the sections are children of the home page)

<?php snippet('header');
foreach(page('home')->children()->listed() as $section) {
  snippet($section->intendedTemplate(), ['data' => $section]);
snippet('footer'); ?>

Thank you very much in advance!


intendedTemplate() returns a template object, but you need the name of the template: