Page::parent()

Gets the page’s parent page.

Table of Contents
  1. Description
  2. Example

Description

Page::parent(array $lot = []): ?Page;

This method returns the current page’s parent as a Page instance.

Example

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

echo '<h1>' . $page->parent->title . '</h1>';
echo '<p>' . $page->parent->description . '</p>';
echo '<h2>' . $page->title . '</h2>';
echo '<p>' . $page->description . '</p>';
echo '<div>' . $page->content . '</div>';

Page::parent()

Gets the page’s parent page.

Page::size()

Gets the file sizes in human readable string format.