PagesLoader::loader method

Count and return how many pages will match the given selector string

Usage

// basic usage
$int = $pages->loader->count();

// usage with all arguments
$int = $pages->loader->count($selector = '', $options = []);

Arguments

NameType(s)Description
$selector (optional)string array Selectors

Specify selector, or omit to retrieve a site-wide count.

$options (optional)array string

See $options in Pages::find

Return value

int


$pages->loader methods and properties

API reference based on ProcessWire core version 3.0.252