-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
I am trying to only active the comments function when to active flag in the frontmatter is set. This is not yet implemented and I think this might not be possible at all. It would be nice, if you could give me some hints:
- onPluginsInitialized Event will check if the route is set in the config and enables the plugin
- onFormPageHeaderProcessed Adds the form to the page header
- onPageInitialized Gives us the page object along with its header settings
The problem is, that I must check if the plugin should be enabled in step 3. But I cannot add the form from step 1 at this late step. This means I can only enable/disable the comments plugin from uris?
Enabling the plugin on a per-page basis has multiple usecases:
- You dont need to edit the plugin config every time, just the page
- You do not need to use uris, which might change
- You can also enable comments for a special page template, e.g. only for blog posts, no matter at which route they are
- This plugin will only be active, where is should. currently you can send a POST to a page without comments form and a comment will be silently added to the data directory
Is there a way to add a form to the page header at a later time?
Metadata
Metadata
Assignees
Labels
No labels