We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14281
    • 120 Posts
    Hello,

    I love the QuickManager, and have been thinking a lot lately about how to expand its usefulness. Today I was experimenting with editing ditto generated sections with QM, by creating a link in a ditto template like this:

    <a class="colorbox" href="[(site_url)]manager/index.php?a=27&id=[+id+]&quickmanager=1">(QM)</a>


    This works. You can click the link, and the document you’re editing will be the document embedded on the page by ditto, not the page itself. However, there is one small problem: When you save the document, QM refreshes the parent and redirects to the page you were editing, instead of the page you were on. This works fine for QM’s current scope, but not for the expanded use as described above.

    However, if you make one small change to close.php, it’s current use will not be effected, but the expanded use will now work perfectly. If you change this line (around line 42):

    <body onload="javascript: parent.location.href = getUrl();">


    to this:

    <body onload="javascript: parent.location.href = parent.location.href;">


    You can now edit any document, whether it be the actual page, or a document that is embedded on that page, and you will always be redirected back to the page you were on, and the changes you made will show on that page.

    It would also be cleaner to remove the js function "getUrl" from close.php. It’s also necessary to surround the link shown at the top with some sort of condition, perhaps using PHx or a custom snippet, to make sure it doesn’t show for non-admins. But those are minor details.

    I want to propose that this small change be incorporated into the core QM code, if it suits everyone.

    Thanks,

    Joey
      • 16610
      • 634 Posts
      If I understand you right editing individual Ditto items is already solved:

      Just download the latest version of QuickManager+:
      http://www.maagit.fi/quickmanager-plus

      And then read about inline buttons:
      http://www.maagit.fi/assets/rte/files/modx/qm-plus-151/readme.html
        Mikko Lammi, Owner at Maagit
        • 14281
        • 120 Posts
        Ah. That’s amazing. Silly me. rolleyes Thanks for the tip!