PagePaths class

Enables page paths/urls to be queryable by selectors. Also offers potential for improved load performance. Builds an index at install (may take time on a large site).

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the PagePaths class also inherits all the methods and properties of: WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
PagePaths::getID(string $path)
int nullGiven a page path, return the page ID or NULL if not found. 
PagePaths::getLanguages()
Languages LanguageReturns Languages object or false if not available 
PagePaths::getMatchQuery(DatabaseQuerySelect $query, Selector $selector)
(nothing)Perform a path match for use by PageFinder 
PagePaths::getPageAndLanguageID($path)
arrayGiven a page path return array of [ page_id, language_id ] 
PagePaths::getPageID($path)
int nullGiven a page path, return the page ID or 0 if not found. 
PagePaths::getPageInfo(string $path)
array boolGet page information about a given path 
PagePaths::getPath(int $pageId)
string nullGiven a page ID, return the page path, NULL if not found, or boolean false if cannot be determined. 
PagePaths::getPaths(int $pageId)
arrayGiven a page ID, return all paths found for page 
PagePaths::getRootSegments()
arrayGet root segments 
PagePaths::isRootSegment(string $segment)
intIs given segment/page name a root segment? 
PagePaths::rebuild()
intRebuild all paths table starting with $page and descending to its children 
PagePaths::rootSegments array 
PagePaths::upgrade($fromVersion, $toVersion)
(nothing)Upgrade module

Additional methods and properties

In addition to the methods and properties above, PagePaths also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #518
    The 518th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 13 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer