We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5143
    • 116 Posts
    Hi,

    I'm trying to set up a MIGX TV that has another MIGX TV as one of its fields.

    Currently, there's Event-Artists which has four fields; three are text, while the fourth has an "inputTV" property of MIGX-Images.

    Event-Artists is configured as follows:

    Form Tabs
    [
      {
        "caption":"Artist Info",
        "fields":[
          {
            "field":"name",
            "caption":"Name"
          },
          {
            "field":"url",
            "caption":"URL",
            "inputTVtype":"url"
          },
          {
            "field":"description",
            "caption":"Description",
            "inputTVtype":"richtext"
          }
        ]
      },
      {
        "caption":"Artist Media",
        "fields":[
          {
            "field":"media",
            "caption":"Add Media",
            "inputTV":"MIGX-Images"
          }
        ]
      }
    ]

    Grid Columns
    [
      {
        "header":"Gnrl Media",
        "width":"160",
        "sortable":"true",
        "dataIndex":"gnrl_media",
        "renderer":"this.renderImage"
      }
    ]


    I call the TV using the following:

    [[!getImageList?
      &tvname=`Event-Artists`
      &tpl=`Event-Artists-Tpl`]]


    Then, in Event-Artists-Tpl, I have the following:

    <li>
        <h4>[[+name]]</h4>
            [[+url:notempty=`<a href="[[+url]]" target="_blank">[[+url]]</a>`]]
            [[getImageList?
              &value=`media`
              &tpl=`Event-Artist-Image-Tpl`
            ]]
            [[+description]]
    </li>


    The issue I have is that nothing is outputting for the getImageList call above. I tried substituting the entire call for "[[+media]]", which outputs what looks like a JSON string. I'm at a complete loss, could anyone throw me a line?

    Chris
      • 4172
      • 5,888 Posts
      try

      &value=`[[+media]]`
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 5143
        • 116 Posts
        Thanks for the reply - I tried that, but with no noticeable difference.

        I case it helps with diagnosis, the settings for MIGX-Images are:

        Form Tabs
        [
          {
            "caption":"Gnrl Media",
            "fields":[
              {
                "field":"gnrl_media",
                "caption":"General Media",
                "inputTVtype":"image"
              }
            ]
          }
        ]


        Grid Columns
        [
          {
            "header":"Gnrl Media",
            "width":"160",
            "sortable":"true",
            "dataIndex":"gnrl_media",
            "renderer":"this.renderImage"
          }
        ]


        And Event-Artist-Image-Tpl just contains
        [[+gnrl_media]]
        [ed. note: chr.s last edited this post 12 years, 5 months ago.]
          • 4172
          • 5,888 Posts
          then try to call both uncached

          [[getImageList
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 5143
            • 116 Posts
            Still no change calling uncached :\
              • 4172
              • 5,888 Posts
              definitly this should work:

                      [[getImageList?
                        &value=`[[+media]]`
                        &tpl=`Event-Artist-Image-Tpl`
                      ]]


              what do you get just with
              [[+media]]


              please post the json-strings, which you get
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 5143
                • 116 Posts
                [[+media]] alone generates the following:

                <img src="[{" migx_id":"1","gnrl_media":"images="" outlet="" event1="" artist="" one="" 6.2.jpg"}]"="" alt="">

                Thought it was odd that it was formatting as an img tag - then realised that the TV output was set to image.
                Changing it to default seems to have sorted the issue. [ed. note: chr.s last edited this post 12 years, 5 months ago.]
                  • 4172
                  • 5,888 Posts
                  yeah, output-type 'image' with a json-string as the src isn't that good for a getImageList - value
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!