PagesNames::names method
Is the given name is use by a page?
If the multilang option is used, it checks if the page name exists in any language. IF the language option is used, it only checks that particular language (regardless of multilang option).
Usage
// basic usage
$int = $pages->names->pageNameExists(string $name);
// usage with all arguments
$int = $pages->names->pageNameExists(string $name, array $options = []);Arguments
| Name | Type(s) | Description |
|---|---|---|
$name | string | |
$options (optional) | array |
|
Return value
intReturns quantity of pages using name, or 0 if name not in use.
$pages->names methods and properties
API reference based on ProcessWire core version 3.0.252