$page->trash() method

Move this page to the trash

This is the same as calling $pages->trash($page).

Example

// Trash a page
$item = $pages->get('/some-page/');
$item->trash();

Usage

$bool = $page->trash();

Return value

bool

True on success, false on failure

Exceptions

Method can throw exceptions on error:

  • WireException


$page methods and properties

API reference based on ProcessWire core version 3.0.244

“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