We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47562
    • 113 Posts
    Howdy.

    I have a simple MigX TV holding customer info; the json entry for the grid columns is:

    [{"header": "Name",
      "width": "32",
      "sortable": "true",
      "dataIndex": "cp_customer_name"},
     {"header": "URL",
      "width": "64",
      "sortable": "false",
      "dataIndex": "cp_customer_url"},
     {"header": "Logo",
      "width": "50",
      "sortable": "false",
      "dataIndex": "cp_customer_logo",
      "renderer": "this.renderImage"}]


    I was wondering why the links to my images weren't showing up; the list is dumped via

    [[!getImageList? &tvname=`cp_customer` &tpl=`customer_tpl` &docid=`[[+id]]` ]]


    with the tpl reading

    <li><a href="[[+cp_customer_url]]" target="_blank"><img src="[[+cp_customer_image]]" alt="[[+cp_customer_name]]" /></a></li>


    When I poke into the db, I see that the formtabs and extended fields populated correctly, but for some reason, columns is set to []. Have I set something up incorrectly? (I'm thinking that the initial issue of my images not showing up is because of the lack of a renderer, yes?)

    Ok, so my confusion is shifting. Anyone encounter such an issue? Any suggestions on what I can do to correct things?

    Thanks much for any hellp...
      • 4172
      • 5,888 Posts
      is this inside a getResources-tpl?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 47562
        • 113 Posts
        Hey Bruno.

        No, I don't think so. Why? Did I do something goofy?

        Initially, I just had things in an @CODE, but wanted to avoid any possible problems with evaluation ordering, so moved it to the tpl...

        Thanks again for any help!
          • 4172
          • 5,888 Posts
          If it is not inside a getResources - tpl, and if you want to get the items of the current Resource, then you do not want the &docid-property

          try:

          [[getImageList? 
            &tvname=`cp_customer` 
            &tpl=`customer_tpl` 
          ]]


          [note] when ever possible, call snippets cached
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 47562
            • 113 Posts
            Okay, adjusted as you said. Still no change; I'll try with a new TV...
              • 47562
              • 113 Posts
              Bruno:

              A quick question for my own education. (And apologies if I'm being completely daft here).

              My error using getImageList is not helpful, to be sure, but how would that cause the columns field in the db to remain empty? I mean, if I just create a new MigX TV (without even making use of it anywhere), if I place a bit of valid json in the "grid columns" area and hit save, shouldn't the db update to contain that info?

              Thanks again for the help, and for providing the awesome MigX functionality.
                • 4172
                • 5,888 Posts
                Are you working with the MIGX-CMP to prepare the configurations or are you doing them by the TV-configuration?

                If you are doing the configurations with the MIGX-CMP, and only then, there should be the columns-configuration stored in the columns-field.
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 47562
                  • 113 Posts
                  Quote from: Bruno17 at May 16, 2014, 08:47 AM
                  Are you working with the MIGX-CMP to prepare the configurations or are you doing them by the TV-configuration?

                  If you are doing the configurations with the MIGX-CMP, and only then, there should be the columns-configuration stored in the columns-field.


                  Thank-you Bruno. Things are beginning to make sense...