Search code examples
phpkirby

Kirby snippet shows only 10 subpages


I'm working on this (NSFW), I created 12 subpages but only 10 are showing in the list. I'm not using any limit() or pagination() in the snippet nor in the panel config, I can't find where this limit is regulated. My guess is a numbering issue, because if in the panel I drag up the 11th subpage up, anything below will not be displayed. Any clue?

php:

<section id="entries">
 <ul>
  <li>
   <div class="line asger">
    <div class="text">00</div>
    <div class="text bold">Asger Carlsen</div>
   </div>
  </li>

<?php $n = 1; foreach($pages->children()->visible()->sortBy('date', 'asc') as $entries): ?>

 <li>
  <div class="line">
   <div class="text">0<?php echo $n++; ?></div>
   <div class="table"><div class="text bold"><?php echo kirbytext($entries->title()) ?></div></div>
   <div class="text"><?php echo kirbytext($entries->kind()) ?></div>
  </div>

  <div class="description hidden">
   <?php echo kirbytext($entries->description()) ?>
  </div>

  <div class="left-half">
   <img class="images hidden" src="<?php echo $entries->images()->first()->url() ?>" alt="<?php echo html($entries->title()) ?>" />
  </div>
 </li>
<?php endforeach ?>
</ul>
</section>

Folder structure: https://www.dropbox.com/s/8gigspwup0kwqei/Screenshot%202014-09-03%2015.39.51.png?dl=0


Solution

  • It was probably a combination of .txt name conflict plus a missing image from a page.