We have a scenario where we need to manipulate content when a user presses "Save and Publish." Specifically, we want to convert links to a short format, but only during publishing.
When "Save and Publish" is triggered, a publishing notification is also triggered. Within this notification, we use the ContentService to locate the page and update its content.
However, once we update the content, we need to perform another "Save and Publish" to save the changes. This, in turn, triggers a new publishing event, creating an infinite loop.
Is it possible to use the ContentService to perform a "Save and Publish" operation without triggering a notification?
Alternatively, should we handle this scenario in a different way?