I want to use subpages as sections (like a one pager) on various pages. I managed this piece of code which gives me the text fields of the subpages:<?php if ($page->subpagesVisibility()->isTrue() && $subpages->isNotEmpty()): ?> <?php foreach($subpages as $section): ?>
<?php endforeach ?>
<?php echo $section->text() ?>
However, the subpages have different templates, different panel fields for e.g. bg-image, gallery, video url. This why I want to fetch the created html of the subpage altogether.
Is there a code which delivers the whole html of the subpage and not only the text?<?php echo $section->html() ?>
does not work
Would be thankful for any help