PagesNames::incrementName()

Increment the suffix of a page name, or add one if not present

Usage

// basic usage
$string = $pagesNames->incrementName(string $name);

// usage with all arguments
$string = $pagesNames->incrementName(string $name, $num = null);

Arguments

NameType(s)Description
$namestring
$num (optional)int null

Number to use, or omit to determine and increment automatically

Return value

string


PagesNames methods and properties

API reference based on ProcessWire core version 3.0.251