From 7ed517fca1be15f75edb7fd680a6cd1c44878fd5 Mon Sep 17 00:00:00 2001 From: floppy0 <31189947+floppy0@users.noreply.github.com> Date: Tue, 19 Dec 2017 16:00:48 +0100 Subject: [PATCH] hasParent method --- bl-kernel/page.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bl-kernel/page.class.php b/bl-kernel/page.class.php index 1880eabb..d48c0de7 100644 --- a/bl-kernel/page.class.php +++ b/bl-kernel/page.class.php @@ -417,6 +417,12 @@ class Page { return false; } + // Returns TURE if the page has a parent, FALSE otherwise + public function hasParent() + { + return $this->parentKey()!==false; + } + // Returns the parent method output, if the page doesn't have a parent returns FALSE public function parentMethod($method) {