We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32646
    • 87 Posts
    I am trying to find a way in a snippet to figure out a docid from a FURL. I just want to make sure it is there before sending a link. If it doesn’t exist, I would go up the chain until I reach a page that actually exists. Make any sense?


    What I am trying to do is move from one master folder to another directly. The structure SHOULD be the same, but I want to check first.


    Thanks
      Just learning the ropes.
      • 11975
      • 2,542 Posts
      Hi,

      did you try with $modx->aliasMap ?
      From the aliasMap array you can get the doc id and then find its parent .

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 32646
        • 87 Posts
        Thanks, Heliotrope!

        How do I use this? I have played around with this and looked in documentation, but can’t get it to work.

        Example:
        $PageURL = 'ru/subfolder/page/';
        $test = $modx->aliasMap[$PageURL];
        


        What will $test be? Even for existing pages, I’m getting a array length of 0. I’m beginning to study PHP, but am still in the newbie stage.
          Just learning the ropes.