From c1c8deef10b4a549199d5d6ca546a04f0caf3e6e Mon Sep 17 00:00:00 2001 From: vv221 Date: Fri, 3 Apr 2020 01:52:49 +0200 Subject: [PATCH] Add link to children pages from any page that is not included in a namespace --- MenuItem.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MenuItem.php b/MenuItem.php index 3a6f097..38cf2ca 100644 --- a/MenuItem.php +++ b/MenuItem.php @@ -12,9 +12,12 @@ class MenuItem extends AbstractItem { * @param string $label */ public function __construct(string $type, string $label) { + global $INFO; $this->type = $type; $this->label = $label; parent::__construct(); - trigger_error("generating a menu item for type \"$this->type\" not implemented in ".get_class($this), E_USER_WARNING); + // Edit the item to show a link to the requested children page + $this->id = $this->type.':'.$INFO['id']; + $this->params = []; } }