We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42465
    • 33 Posts
    Hi folks. For some reason [[!getImageList]] is not outputting as I would like. I want the MIGX TV of a child resource to output some data but I can't get it to do so. When testing I can get the parent to output no problem but this is not something I want.



    Some background Info

    I have parent categories, each with child resources

    Cat A
    A1
    A2

    Cat B
    B1
    B2




    What I Want

    I want MIGX to output some product specs for A1- B2 (not the parent) but I get nothing. If I mess around and enable the MIGX TV on the parent, Cat A - Cat B, then it works for these (again, not something I want) but still not the children.



    What Code I'm Using

    In the Template I'm using getResources to call a tpl called products_invidual_tpl
    [[getResources? &parents=`[[*id:isnot=`100`:then=`[[*id]]`:else=`92`]]` &depth=`2` &limit=`false` &tpl=`products_invidual_tpl` &sortby=`{"menuindex":"ASC"}` &includeTVs=`1` &hideContainers=`1` &includeContent=`1` &showHidden=`1`]]
    


    In products_invidual_tpl chunk I'm calling another tpl chunk called specs and a TV called productSpec
    <ul>
    [[!getImageList? &tvname=`productSpec` &tpl=`specs` ]]
    </ul>
    


    And the code for specs is simply:
    <li>
    <p><span>[[+title]]:</span> [[+description]]</p>
    </li>
    


    My input options for the productSpec TV is as follows:
    Input type:migx
    
    Form Tabs:
    [
    {"caption":"Info", "fields": [
        {"field":"title","caption":"Title"},
        {"field":"description","caption":"Description","inputTV":"richtextTV"}
    ]}
    ]
    
    Grid Columns:
    [
        {
            "header": "Title",
            "width": "80",
            "sortable": "true",
            "dataIndex": "title"
        },
        {
            "header": "Description",
            "width": "80",
            "sortable": "true",
            "dataIndex": "description"
        }
    ]
    



    Final thoughts

    I'm at a loss.

    Help!

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

    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      In your getResources tpl, when you call getImageList, you need to also specify the docid http://rtfm.modx.com/display/ADDON/MIGX.Frontend-Usage#MIGX.Frontend-Usage-UsingMIGXwithgetResources
        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
        • 42465
        • 33 Posts
        Thanks Susan. That was it!