You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add blocks to static pages
The local_staticpage plugin was not intended to show blocks on the static pages. However, it is possible. You have to enable page editing somewhere else in Moodle (on your MyMoodle page or on a course page, for example) and go to your static page. Now you see the standard "Add block" menu and can add blocks to the static page. Additionally, if you click on the block's gear icon, you can control if the block is shown only on the static page the block was added to or on all static pages.
However, whenever I add an HTML block to an individual page, it shows up on all static pages. The options for selecting where the block is displayed are:
local-staticpage-view
local-staticpage-view*
local-staticpage-*
local-*
Any page
I currently have each of the HTML blocks set to option 1 (local-staticpage-view) but it doesn't seem to matter as I've tried each of the options containing the phrase 'staticpage' and all HTML blocks show up for every static page. Hoping this is not something to do with our Theme since we don't want to change that.
If it is not a theme-related issue, then I would like to request this functionality be implemented so that individual static pages can have different HTML (and possibly other) blocks.
The HTML block at the top of each page should only be shown on the first link's page while the second HTML block should be shown only on the second link's page.
The text was updated successfully, but these errors were encountered:
thank you for raising this issue and your examples.
After a short investigation this may due to the implicit setting of the pagetype by the Moodle Page API.
First idea:
I may be able to provide a fix by setting an explizit page type, suffixing the exisiting one with the document name.
However, this would break if the document title changes. Furthermore if deleting a document without deleting the blocks first, the blocks from this static page would be orphaned in the database.
Per the following verbiage on the Static Pages plugin page (https://moodle.org/plugins/pluginversion.php?id=11257), it should be possible to show different HTML blocks on different static pages:
However, whenever I add an HTML block to an individual page, it shows up on all static pages. The options for selecting where the block is displayed are:
I currently have each of the HTML blocks set to option 1 (local-staticpage-view) but it doesn't seem to matter as I've tried each of the options containing the phrase 'staticpage' and all HTML blocks show up for every static page. Hoping this is not something to do with our Theme since we don't want to change that.
If it is not a theme-related issue, then I would like to request this functionality be implemented so that individual static pages can have different HTML (and possibly other) blocks.
For reference, the static pages for our site are open to the public and can be viewed here:
https://apprenticemoodle.com/local/staticpage/view.php?page=Youth-Builders
https://apprenticemoodle.com/local/staticpage/view.php?page=book-info
The HTML block at the top of each page should only be shown on the first link's page while the second HTML block should be shown only on the second link's page.
The text was updated successfully, but these errors were encountered: