0

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

Jeremy Harris
  • 24,318
  • 13
  • 79
  • 133
anoonimo
  • 367
  • 2
  • 3
  • 13
  • I would guess the `visible()` call has something to do with it. Are you sure the other two are not hidden? What is the output of `$pages->countInvisible()`? – Jeremy Harris Sep 04 '14 at 00:56
  • interesting, indeed it returns 2 invisible subpages, but I'm positive that both in the folder structure (they have a number as filename) and in the panel (they're in the upper section) they are set as visible. – anoonimo Sep 04 '14 at 02:13

2 Answers2

1

Your folder-structure is defiantly correct. You only could try to rename 04-2001 to something like 04-foo2001 but i don`t think that this causes your issue.

I had some quite similar behavior once. It was caused by image-metadata txt's that had the same name like the page-content txt's. So maybe it would be helpful if you show us your complete folder-structure including the files/filenames.

Next idea: Are you sure you have no invalid markdown in your txt's?

PS: This should be a comment, but i’m at 49 reputation, so i’m not allowed to comment ;) cheers!

DerZyklop
  • 3,672
  • 2
  • 19
  • 27
  • I tried to rename the .txt files but nothing changed. I wonder if there's a default limit(10) somewhere in the kirby files, there's one in the panel (just to set how many you can see in the CMS interface) but that doesn't affect the front-end output. Here's my full folder structure https://www.dropbox.com/s/xto9ffovenldl9v/Screenshot%202014-09-04%2015.39.00.png?dl=0 – anoonimo Sep 04 '14 at 19:41
  • ok I removed the Panel limit() (under panel/lib/settings.php) and now if I change their position seems like they are displayed. I'll try to delete and add again all entries to see if it works. – anoonimo Sep 04 '14 at 19:44
0

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

anoonimo
  • 367
  • 2
  • 3
  • 13