We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23496
    • 20 Posts
    Hello,

    I want to get the ID of any resource.
    Please have a look at this:

    context web
    --resource 1
    ----resource 2
    ----resource 3
    ------resource 4
    ------resource 5
    --resource 6
    ----resource 7
    ----resource 8
    ------resource 9
    ------resource 10
    ------resource 11
    ------resource 12

    If I am in the resource 12 I want to know the ID of resource 6 else if I am in the resource 3 or 4 I want to know the ID of resource 1. It must be dynamic.

    Thanks for your response.

    Yours
    Florian

      • 22427
      • 793 Posts
      I'm not sure, but it seems that you want the parent resource of the one you are in.
      You get it with the resource field [[*parent]].

      P.S.
      The category "Revo Development" is not the right one to post a beginner's question like that. ;-)
        • 38705
        • 101 Posts
        If you are looking into getting a higher parent resource you might want to check out: UltimateParent
        you can find it here: http://modx.com/extras/package/ultimateparent
          Addict since 2012....
          • 23496
          • 20 Posts
          Thank you both. I do my best smiley