From ceb4dc300fc4dcf70501993f5c01828ebc79c42f Mon Sep 17 00:00:00 2001 From: Linda Date: Tue, 13 Jun 2023 14:03:42 +0200 Subject: [PATCH] add hint on version in navigation API docs According to https://moodle.academy/mod/book/view.php?id=851&chapterid=697 and by trying the code myself I found that adding an item to the flat/primary navigation in the described way is only possible in Moodle versions < 4.0. --- docs/apis/core/navigation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/apis/core/navigation/index.md b/docs/apis/core/navigation/index.md index aeab3f0fe4..e78efb91a0 100644 --- a/docs/apis/core/navigation/index.md +++ b/docs/apis/core/navigation/index.md @@ -379,7 +379,7 @@ navigation_node::override_active_url( ### **Q.** How do I add a node to the "flat" navigation in the Boost theme? -After creating a node and adding it to the navigation tree - you can set the property `showinflatnavigation` to true in order for this node to be displayed in the flat navigation. +Adding a node to the "flat" navigation is only possible for Moodle versions before 4.0. After creating a node and adding it to the navigation tree - you can set the property `showinflatnavigation` to true in order for this node to be displayed in the flat navigation. ```php $node = navigation_node::create(...);