We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49891
    • 4 Posts
    Hi everyone. Im new to this forum and modx and wanted to find out how to get "Link_Attributes" from a specific page.

    I have the following code below as a Chunk.

    <a href="[[*link_attributes]]" target="_blank">test</a></p>

    I want to use the chuck to pull the [[*link_attributes]] from the pageID that I put the chuck into but its not working. How can I call the link_attributes field for a specific page? ie if I wanted the link_attributes from page id 33 what do I need to do?

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use GetResourceField, FastField, or the custom parser from pdoTools (which is actually FastField's parser).

      http://rtfm.modx.com/extras/revo/getresourcefield
      http://rtfm.modx.com/extras/revo/fastfield
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 49771
        • 16 Posts
        Using the getresourcefield extra your call for the example would be this

        Chunk:

        <a href="[[getResourceField? &id=`33` &field=`link_attributes`]]" target="_blank">test</a></p>
        


        Assuming that you wanted the link attributes to be called in the href oppose to the target
          • 49891
          • 4 Posts
          Thanks for your replies.

          Thanks brandonhim, that's exactly what I was after. [ed. note: oxters last edited this post 11 years, 8 months ago.]