We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36723
    • 94 Posts
    Can I get the menu title based off of the parent id?

    I have seen this code which will get the parent title but I would like the menu title of the parent.

    To get the document title, use
    $r = $modx->getPageInfo($id,1,'pagetitle');
    
    if($r){
      $pagetitle = $r['pagetitle'];
    }
    
      • 26931
      • 2,314 Posts
      did you try menutitle instead of pagetitle?
        • 36723
        • 94 Posts
        yes that worked! I wished I would have thought of that... Anyway thanks!