← Back to Multi Revisions Support
Hello. Can I use this plugin in frontend? I need to be able to manage revisions on behalf of frontend users authorized using RainLab. User.
Hello. Yes. But this will require programming the logic for the external controller (or corresponding code in the page). The plugin uses the standard tools of OctoberCMS and simply integrates this in itself in a convenient interface using the "Restore" form widget with binding to controllers and models through the Behaviors mechanism. Unfortunately, I cannot provide the finished code (but I will take note of the idea for writing the appropriate external component for pages). The plugin has an onRestore() handler in the corresponding code for the formwidget (your will pre-binding the formwidget to an external controller, or by copying the handler code) and you can call it from the external interface specifying revision_id (revision id for restoring data to this point), how to get it is a separate topic (see code) , I can only add that the revision mechanisms for data models and for pages are completely different (therefore, 2 different Behaviors are used).
1-2 of 2