PagesLoader::findByName()

Find page(s) by name

This method is optimized just for finding pages by name and it does not perform any filtering or access checking.

Usage

// basic usage
$array = $pagesLoader->findByName(string $name);

// usage with all arguments
$array = $pagesLoader->findByName(string $name, array $options = []);

Arguments

NameType(s)Description
$namestring

Match this page name

$options (optional)array
  • `parent' (int|Page): Match this parent ID Default:0
  • parentName (string): Match this parent name Default:''
  • getArray (bool): Get PHP info array rather than Page|NullPage|PageArray? Default:false
  • getOne (bool|int): Get just one match of Page or NullPage? Default:false When true, if multiple pages match then NullPage will be returned. To instead return the first match, specify int 1 instead of boolean true.

Return value


PagesLoader methods and properties

API reference based on ProcessWire core version 3.0.251