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
I am trying to get a write() on an ORM dataobject to trigger the static publishing of several related pages. Looking at the docs, it seems I need to implement the StaticPublishingTrigger interface on the Dataobject to force this to happen.
Doing that however, does not seem to trigger the necessary calls to objectsToUpdate / objectsToDelete functions from within the PublishingEngine. The docs aren't very clear on the exact usage.
Looking through the PublishingEngine code, it seems there are only hooks for onBefore and onAfter publish methods, so these won't trigger on a DB object wrte() , or am I missing something?
Can anyone help me out with a concrete example? I'll put up a PR for the docs once I get it going.
The text was updated successfully, but these errors were encountered:
Having tinkered around a bit I figured it out. In order for the publish-hooks to be picked up, the SiteTreePublishEngine extension needs to be added to the relevant DataObject Class. This wasn't clear for me from the docs.
Hi,
I am trying to get a write() on an ORM dataobject to trigger the static publishing of several related pages. Looking at the docs, it seems I need to implement the StaticPublishingTrigger interface on the Dataobject to force this to happen.
Doing that however, does not seem to trigger the necessary calls to objectsToUpdate / objectsToDelete functions from within the PublishingEngine. The docs aren't very clear on the exact usage.
Looking through the PublishingEngine code, it seems there are only hooks for onBefore and onAfter publish methods, so these won't trigger on a DB object wrte() , or am I missing something?
Can anyone help me out with a concrete example? I'll put up a PR for the docs once I get it going.
The text was updated successfully, but these errors were encountered: