Page::exist()

Checks if the page exists.

Table of Contents
  1. Description
  2. Example

Description

Page::exist(): string|false;

This method returns the page’s file path if it exists, else it will return false.

Example

$page = new Page('.\lot\page\article.page');

if ($page->exist()) {
    echo '<h1>' . $page->title . '</h1>';
    echo '<p>' . $page->description . '</p>';
    echo '<div>' . $page->content . '</div>';
} else {
    echo '<p role="status">' . i('Page does not exist.') . '</p>';
}

Page::exist()

Checks if the page exists.

Page::size()

Gets the file sizes in human readable string format.