We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Any plugin out there that lets you really preview a page before you save and publish the changes? 'tis a handy feature...
    • Kind of hard to have MODx generate a page with content that hasn't been saved to the database. The closest I've seen is the StageCoach extra, which saves to a temporary resource. Usually I just don't publish a resource until I've seen that it's good.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3749
        • 24,544 Posts
        WordPress does save drafts to the DB and, unlike MODX, you don't have to reload the page to see the changes, you just hit the "Preview" button. It also doesn't launch a new window every time you hit Preview, it just refreshes the existing Preview window if there is one.

        I think all it would take to do this in MODX is a modDraft object (a clone of modResource or even an existing modResource with a classKey of 'draft') and a modDraftResource intersect object. The Preview button (or "View Draft") would take you to the modDraft resource. Publish (or "Approve") would copy the modDraft object to the modResource object. This would be really handy if you wanted to let users update Resources, view the changed Resource, then approve/publish their changes.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • Yeah, that would do it: save a snapshot of the data to a temporary row in the database... the hard part would be modifying the Ext JS stuff... I've been mucking around with that and it is absolutely murder to modify the Ext JS stuff for custom resource classes. Sharp stick in the eye sounds good after bleeding all over those directories for days. I'm still stuck trying to fix one of those doozies.

          Really the feature is most handy for modifying EXISTING pages: not just testing the waters with a previously unpublished page. [ed. note: Everettg_99 last edited this post 10 years, 9 months ago.]
          • FWIW, I have an Extra in development that stores Drafts, as well as History, of Resource objects, and includes a Preview functionality. It can be extended to track Drafts and/or History of any object.

            We will be unveiling this Extra, called Revise, along with an upcoming migration of RTFM to a MODX-powered site.
              • 3749
              • 24,544 Posts
              Sounds great. smiley

              Will it have a way to "approve" other people's work? That seems to be a frequent request.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 6437
                • 157 Posts
                Whilst I love the idea of adding in true workflow with paths and approval related to access control, I suggest that this comes a bit later.

                This will be such a leap forward in terms if enterprise functionality, I think we should initially aim to get the feature on a par with Wordpress - bug free, slick, stable and widely adopted as the priority. I've no doubt Jason is building in a scalable way with one eye towards workflow management in future.

                It's times like these I wish I remembered how to code in PHP and had got around to learning to code for Revo. This deserves a community push.

                • I agree that the feature should be implemented, but WordPress in many ways is a terribly low bar.... of the 4 descriptions here: "bug free, slick, stable and widely adopted", WP qualifies for only one in my opinion...
                    • 6437
                    • 157 Posts
                    Although I of course agree on Wordpress code quality, and I agree that matching functionality is a low bar. This is why it's such a good move for Revo to get it - it's a low hanging fruit (maybe not low hanging technically!).

                    Whilst we all may criticise WP, this feature has been there for a long long time, now handles auto saves, and works well enough (and easily enough) to satisfy a huge user base. That classifies as success.

                      • 3749
                      • 24,544 Posts
                      I hate the WordPress architecture and codebase as much as the next guy (probably more), but I've been dual blogging in WordPress and Articles lately and WordPress does have its points. When I write and article in WP, I can save a draft and see a true preview as often as I like (always in the same window -- updated as soon as I click Preview). When I'm satisfied, I click on the "Submit for Review" button. Someone else reviews it and schedules it for future publication (I assume with a few clicks).

                      In MODX, I have to hit Preview, then Shift-F5 every time I want to see my changes, and because the cache has been cleared, it's slow. For this kind of stuff, WP is just smoother.

                      This may be a low bar, but MODX can't get over it at present. I'm hoping Revise will change that.

                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting