We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37550 ā˜† A M B ā˜†
    • 711 Posts
    Hi all,

    I’m currently working on a site which has over 500 PDF / XLS files each one we add into MODx as a page using the FiledownloadPE plugin and a TV File.

    What we would like to do is delete the file on the server if the page was deleted in MODx.

    Has anyone come across this type of feature? Any pointers on OnBeforeDocFormDelete would be appreciated aswell as it looks like I will need to build this type of plugin for the site I am working on.

    Thanks Aaron.

      http://www.onesmarthost.co.uk
      UK MODX Hosting with love.
      • 7231
      • 4,205 Posts
      ChuckTruck put together a handy cheetsheet of modx events and their parameters (need to search for the link):
      $modx->invokeEvent("OnBeforeDocFormDelete",
      array(
      "id"=>$id,
      "children"=>$children
      ));

      $modx->invokeEvent("OnDocFormDelete",
      array(
      "id"=>$id,
      "children"=>$children
      ));

        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]