We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51792
    • 2 Posts
    Hi everybody. I am a complete newbie to MODX and have a little problem with it.

    On a page there is something like this:

    {"MIGX_id":"2","header":"SOME TEXT","target":"","anchor":"","descr":"


    The goal is to make SOME TEXT a link. Putting it in <a> tag doesnt help. Thanks in advance.

    This question has been answered by sottwell. See the first response.

    • Where is the URL? I would presume the "SOME TEXT" would be the link text, but you still need a URL.
        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
      • discuss.answer
        You do not access MIGX TV values directly. As you have noticed, they are stored as JSON strings. MIGX provides a number of snippets to process them. The most common is the getImageList snippet. This snippet will produce placeholders for each field in the TV form. It requires the name of the TV and the name of a chunk to use as a tpl (a mini-template just for the snippet output). That output chunk would look something like this:
        <li><a href="[[+url]]" target="[[+target]]">[[+header]]</a></li>

        This would produce a list item with a link in it. If you have five rows in your MIGX grid, you'll get five list items.
          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
          • 51792
          • 2 Posts
          Quote from: sottwell at Feb 10, 2016, 12:25 PM
          You do not access MIGX TV values directly. As you have noticed, they are stored as JSON strings. MIGX provides a number of snippets to process them. The most common is the getImageList snippet. This snippet will produce placeholders for each field in the TV form. It requires the name of the TV and the name of a chunk to use as a tpl (a mini-template just for the snippet output). That output chunk would look something like this:
          <li><a href="[[+url]]" target="[[+target]]">[[+header]]</a></li>

          This would produce a list item with a link in it. If you have five rows in your MIGX grid, you'll get five list items.
          made it, thank you for your time