hi,
i want to build the one-page, like in the Cookbook. but just in the beginning i get trouble with the syntax.
i get invalid arguments for foreach()
1. <?php
2. snippet('header');
3. foreach($pages->visible() as $section) {
4. snippet($section->uid(), array('data' => $section));
5. }
6. snippet('footer');
7. ?>
the subpage.php in snippets contains simple things like:
<h1 class=section-title><?php echo $data->title()->html() ?></h1>
<?php echo $data->text()->kirbytext() ?>
i tried with version 3.5.5