We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17705
    • 501 Posts
    How can I read the pagetitle of the parent document, using DropMenu?


    Luciano
      • 17705
      • 501 Posts
      I got it resolved, with help of opengeek and doze...

      //If you need the grandparentdocument (not fully tested)
      //$parentdocument = $modx->getParent($modx->documentObject[’parent’],1,’pagetitle’);

      //if you need the parent document
      $parentdocument = $modx->getParent($modx->documentIdentifier,1,’pagetitle’);.

      //and this was what I need to implement, a way to explode data from pagetitle, or other not
      //visible data, to handle a hack of DropMenu with only one snippet and one template
      //having a lot of documents
      $datos = explode("****", $parentdocument[’pagetitle’]);
      $breakPoints = explode(",", $datos[1]);