mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 17:54:44 +02:00
Add PR #113 for page ID supported as page name format
This commit is contained in:
committed by
Ryan Cramer
parent
2190a6ef37
commit
c8efbdfe4b
@@ -320,6 +320,10 @@ class PagesNames extends Wire {
|
|||||||
$name = trim((string) $page->title);
|
$name = trim((string) $page->title);
|
||||||
$formatType = 'field';
|
$formatType = 'field';
|
||||||
|
|
||||||
|
} else if($format === 'id' && $page->id) {
|
||||||
|
// page ID, when it is known
|
||||||
|
$name = (string) $page->id;
|
||||||
|
|
||||||
} else if($format === 'random') {
|
} else if($format === 'random') {
|
||||||
// globally unique randomly generated page name
|
// globally unique randomly generated page name
|
||||||
$name = $this->uniqueRandomPageName();
|
$name = $this->uniqueRandomPageName();
|
||||||
|
Reference in New Issue
Block a user