[docs] Supplementary content in the sticky footer#1636
Conversation
✅ Deploy Preview for moodledevdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Moodle 5.3 DevDocs to document the new $PAGE supplementary content API for adding an action_link to the sticky footer, decoupled from course format linear navigation support (MDL-88601).
Changes:
- Adds a Moodle 5.3 developer update entry describing
set_supplementary_content()/get_supplementary_content()and a real-worldmod_forumuse case. - Extends the linear navigation guide with a new section explaining how to add supplementary sticky-footer content, including a PHP example and behavioral notes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/devupdate.md | Adds a new Moodle 5.3 dev update entry describing supplementary sticky-footer content and links to the detailed guide section. |
| docs/apis/plugintypes/format/linear_navigation.md | Documents how to set/retrieve supplementary sticky-footer content and how it interacts with linear navigation rendering. |
Document the new moodle_page::set_supplementary_content() and get_supplementary_content() methods introduced in MDL-88601, which allow injecting additional content into the sticky footer independently of course format linear navigation support, as used by mod_forum to link back to the discussion list.
32fb02c to
882cea5
Compare
|
Thanks @sarjona, all good. |
|
|
||
| <Since version="5.3" issueNumber="MDL-88601" /> | ||
|
|
||
| Independently of whether the current course format supports linear navigation, any part of Moodle can request additional content to be displayed in the sticky footer by calling `moodle_page->set_supplementary_content()` with an `action_link` instance: |
There was a problem hiding this comment.
I don't think it's a good idea to replace moodle_page-> with $PAGE (I updated the patch replacing :: with -> but that's all).
|
|
||
| When supplementary content is set, the sticky footer is displayed even if the course format does not support linear navigation, or the setting is disabled, showing only the supplementary content. If linear navigation is also enabled, both the navigation controls and the supplementary content are rendered together in the footer, separated by a border. | ||
|
|
||
| Use `moodle_page->get_supplementary_content()` to retrieve the current value, which returns `null` if none has been set. The value is automatically reset whenever `moodle_page->reset_theme_and_output()` is called. |
There was a problem hiding this comment.
I don't think it's a good idea to replace moodle_page-> with $PAGE (I updated the patch replacing :: with -> but that's all).
Document the new moodle_page::set_supplementary_content() and get_supplementary_content() methods introduced in MDL-88601, which allow injecting additional content into the sticky footer independently of course format linear navigation support, as used by mod_forum to link back to the discussion list.