We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9359
    • 128 Posts
    Hi,
    i want to know what is it the best and easy way for get fields of a resource having only id.
    For example how to get the title of a resource that has id 5

    thx [ed. note: fabryshock last edited this post 15 years ago.]
      "Destiny is not a matter of chance, it's a matter of choice"
      • 33968
      • 863 Posts
      Install getResourceField and call like this:
      [[getResourceField? &id=`5` &field=`pagetitle`]]
      
        • 36592
        • 970 Posts
        I suppose this is Evo's topic wink

        Using getField snippet (http://modx.com/extras/package/getfield), something like ...
        [!getField? &docid=`5` &field=`pagetitle`!]
          • 9359
          • 128 Posts
          yes, is Evo's topic so getResourceField not work.
          getField is perfect!!!! many thx!!!!

            "Destiny is not a matter of chance, it's a matter of choice"
            • 9359
            • 128 Posts
            Only another question:
            the GetField call with this parameter not work &docid=`[!ParentParent!]`


            Why?
            [ed. note: fabryshock last edited this post 15 years ago.]
              "Destiny is not a matter of chance, it's a matter of choice"
              • 33968
              • 863 Posts
              I suppose this is Evo's topic
              Evo? What's that? tongue

              Oops excuse me, I hadn't noticed this was the Evo forum...

              @Fabry - [ParentParent] is not a valid tag and your syntax is wrong. Try this:

              &docid=`[*parent*]`
                • 9359
                • 128 Posts
                sorry Lucas my call is this
                [[GetField? &docid=`[!ParentParent!]`&field=`pagetitle`]]

                ParentParent is not a tv but a snippet
                  "Destiny is not a matter of chance, it's a matter of choice"
                  • 9359
                  • 128 Posts
                  i don't understand because not work....
                    "Destiny is not a matter of chance, it's a matter of choice"
                    • 9359
                    • 128 Posts
                    i have find the solution by my self:

                    [!GetField? &parent=`1` &parentLevel=`2`&field=`pagetitle`!]

                      "Destiny is not a matter of chance, it's a matter of choice"