Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • Add-ons
  • Creating & Repurposing Content
  • Front-end Document Management
  •  
  • QM+ Inline create button - Return to calling page instead of new resource?#

  • 36805
    354

    MrDutchy Reply #1, 1 year, 4 months ago

    Reply
    • Link to this post#1
    First of all thanks Mikko/maagit for QM+, you did a terrific job! I have been playing with the new inline add resource function of QM+ and it is totally AWESOME!

    I use it to add a document with the parent being the current document like so:
    <!-- qm-new [*id*] 5 'New block item' -->
    By a simple ditto call in the parent i can display all children in floating boxes. Hello dynamic layout!

    I have one question however: Is it possible to make QM+ return to the page it was called from rather than to the document I just created?


  • 36805
    354

    MrDutchy Reply #2, 1 year, 4 months ago

    Reply
    • Link to this post#2
    I have solved it by writing a plugin. It is triggered OnDocFormSave and checks whether the document was being saved with QM+. If it is it forwards to the parent.

    I've added a check for a specific template I use for page blocks so you can still get the normal behaviour for non-block documents. Probably one should make that configurable by the plugin configuration.

    Maybe this is useful to someone else too..
    $e = &$modx->Event;
    switch ($e->name)
    {
        case "OnDocFormSave":
            if (intval($_REQUEST['quickmanager']) == 1)
            {
                $doc = $modx->getDocument($id, 'template');
                $parent = $modx->getParent($id, 0, 'id,template');
                if ($doc['template']== 5)
                     $modx->sendForward($parent['id']);
            }
            break;
    }
    


  • 16610
    609
    QuickManager+ official project page

    Mikko Lammi, Owner at Maagit

    Lammikko Reply #3, 1 year, 4 months ago

    Reply
    • Link to this post#3
    This will work also:
    http://modxcms.com/forums/index.php/topic,52735.msg305637.html#msg305637


  • 36805
    354

    MrDutchy Reply #4, 1 year, 4 months ago

    Reply
    • Link to this post#4
    Thanks I'll use that instead. It's certainly more KISS
    Ahwell at least I've brushed up on my plugin/modx api knowledge





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
Lammikko, dorstox

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy