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
  • Evolution
  • Core Development
  •  
  • what is the system event called when a document is moved?#

  • 5340
    1,556
    Responsive CSS Grid: cipalabs.com/projects/metal/
    Site: psd-to-modx.com
    Blog: modxrules.com
    Evo Plugin: Template Rules

    cipa Reply #1, 3 years, 5 months ago

    Reply
    • Link to this post#1
    I am looking for a system event that is called when a document is moved.

    My plugin, automaticTpl is using OnDocFormPrerender to set the template of a new document.

    I would also like to change the template of the document when it is moved. I know it's not a "nice" thing to do but I was wondering if it is possible.

    Thank You



  • 22797
    134

    paulb Reply #2, 3 years, 5 months ago

    Reply
    • Link to this post#2
    This is something I would love to have control over too. I don't think that event exists.

    Here's a potentially complicating factor that is closely related: as far as I know, if you're using the right-click menu, this bypasses the system events under some(?) circumstances (see http://modxcms.com/forums/index.php?topic=22759.0 ). That makes it problematic because you can't count on the same results for actions initiated by the right-click menu vs. the icons over the top of the document. If you can find a way around that, or if you can disprove it, I'd love to hear about it.


  • 28042
    14,561
    How MODx Evo WorksLog in to an Evo Manager username guest, password guestuser.

    sottwell Reply #3, 3 years, 5 months ago

    Reply
    • Link to this post#3
    When a document is moved, the cache is updated, so you could use the OnBeforeCacheUpdate or OnCacheUpdate event. You could then check and make sure the document has the template it should have. If there's no document ID ($_REQUEST['id']) available (this wasn't a document editing/moving cache event), just return to normal processing.





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:
cipa, paulb, sottwell

 
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
  • Work 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