Reference

Guide

$pages->notTemplate()

Filter all pages by excluding the given template

$pages->notTemplate(string|array $templates): Kirby\Cms\Pages

Parameters

Name Type Default Description
$templates string|array

Return type

Kirby\Cms\Pages

Examples

Using a string parameter to exclude a single template:

$articles = page('blog')->children()->listed()->notTemplate('video-article');

Using an array of options to exclude multiple templates:

$articles = page('blog')->children()->listed()->notTemplate(['video-article', 'short-article']);

Source code

kirby/src/Cms/Pages.php#L445