We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49577
    • 12 Posts
    I am a new guy at Modx and have been helped with a few issues here on the board by a number of helpful fellows.

    I have now run into an issue with MIGX.

    I am using MIGX to dynamically add new articles to a website so I need 3 fields, Heading, sub heading and description.

    I have been following the guide here: https://www.youtube.com/watch?v=adU2d8V4y3E and reading a bunch online.

    I think I may be missing a piece of the puzzle to make this work.

    I have a TV created called "MainArticles" with form tabs:
    [
    {"caption":"Info", "fields": [
        {"field":"title","caption":"Title"},
    {"field":"subheading","caption":"Sub Heading","inputTVtype":"textarea"},
        {"field":"content","caption":"Article Content","inputTVtype":"textarea"}
    ]}
    ] 


    and Grid Columns
    [
    {"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"},
    {"header": "Sub Heading", "width": "160", "sortable": "false", "dataIndex": "subheading"},
    {"header": "Article Content", "width": "160", "sortable": "false", "dataIndex": "content"}
    ]


    I have a chunk named "MainArticles" with the following:
    <div class="post">
    <h2>[[+title]]</h2>
    <p><strong>[[+subheading]]</strong></p>
    <p>[[+content]]</p>
    <a title="Learn More" class="learn-more" href="#">Learn More</a>
    </div>


    And in my main template to pull this information through I have this:
    [[!getImageList?
    &tvname='MainArticles'
    &tpl='MainArticles'
    ]]


    I can click on my "home" resource and add data into my MODX TV buy nothing is appearing on my page.

    What am I missing?

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

      • 4172
      • 5,888 Posts
      This is looking good so far.
      Are you trying to get this on another page, as you have filled this TV?

      If you are at another page, you have to add the docid of that resource with

      &docid=`yourID`

      If you are at the same page and you get nothing, see what you get with just the TV-tag

      [[*MainArticles]]


      do you get anything then?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 49577
        • 12 Posts
        When I add the MainArticle TV I get the following output in plain text on my page:

        [{"MIGX_id":"1","title":"test article title","content":"test article content"},{"MIGX_id":"2","title":"test article 2","subheading":"this is a sub heading","content":"this is some content"}]


        Sorry i'm not sure I "completely" understand about the docid part of your reply. [ed. note: bonkas last edited this post 11 years, 7 months ago.]
        • discuss.answer
          • 4172
          • 5,888 Posts
          the issue is, you didn't use backtics but single quotes

          [[!getImageList?
          &tvname='MainArticles'
          &tpl='MainArticles'
          ]]


          vs

          [[!getImageList?
          &tvname=`MainArticles`
          &tpl=`MainArticles`
          ]]


          didn't have seen that at first
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 49577
            • 12 Posts
            Wow! I didn't pick that up either...

            You are a scholar and a gentleman. I will change this and see how we go!