List newest pages

Hi, I tried to code a template that shows me the last modified/created pages (of the video template) but somehow it only shows random pages.

Here is my code:

<?php $index = $site->index()->filterBy('template', 'video')->not('@eaDir')->sortBy('date')->not('@eaDir')->limit(6);?>

I need to hide the @eaDir because the site is hosted on a Synology NAS box and the OS is creating these @eaDir-Files all over the place.

Anybody has an idea of a better way to display the whole sites last created/modified pages?

Best,
Chris

If you filter the content anyway, it shouldn’t be necessary to exclude the @eaDir directories explicitly, because I don’t think they will contain any files with the templates you are looking for? Also, you could just search for visible folders, that would exclude @eaDir as well.

The other thing in you code, you include not(’@eaDir’) twice, that might not be correct.