$page->matchesDatabase() method

Given a selector, return whether or not this Page matches by querying the database

Available since version 3.0.225.

Example

if($page->matchesDatabase("created>=today")) {
  echo "This page was created today";
}

Usage

$bool = $page->matchesDatabase($s);

Arguments

NameType(s)Description
sstring, Selectors, array

Selector to compare against (string, Selectors object, or array).

Return value

bool

Returns true if this page matches, or false if it doesn't.


$page methods and properties

API reference based on ProcessWire core version 3.0.236

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani