We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49560
    • 28 Posts
    I'm currently trying to make a gallery with a simple nested migx TV. My template contains a simple gallery (array of images) + slightly more advanced galleries (array of headings and arrays with images). The TV the gallery is using is also used by the adv. gallery.

    By changing the nested inputTV Tab setting ("inputTV":"mg.gallery" => "inputTV":"smthelse") it displays the right gallery.

    ------------------------------------------------------------------------------------------------

    Example:

    mg.gallery

    1. g_image: "teaser01.jpg"
    2. g_image: "teaser02.jpg"
    3. g_image: "teaser03.jpg"

    mg.gallery_showroom

    • gs_heading: "unnecessaryheading"
    • gs_galleryslides (mg.gallery):

      1. g_image: "slide01.jpg"
      2. g_image: "slide02.jpg"
      3. g_image: "slide03.jpg"
      4. g_image: "slide04.jpg"

    Outputs:
    <ul>
    <li>teaser01.jpg</li>
    <li>teaser02.jpg</li>
    <li>teaser03.jpg</li>
    </ul>
    teaser01.jpg<br>
    teaser02.jpg<br>
    teaser03.jpg<br>


    Expected output:
    <ul>
    <li>teaser01.jpg</li>
    <li>teaser02.jpg</li>
    <li>teaser03.jpg</li>
    </ul>
    slide01.jpg<br>
    slide02.jpg<br>
    slide03.jpg<br>
    slide04.jpg<br>


    ------------------------------------------------------------------------------------------------

    Necessary Code:

    TV: mg.gallery
    [
    {"caption":"Gallery","fields": [
    {"field":"g_image","caption":"Picture","inputTVtype":"image"}
    ]}
    ]


    TV: mg.gallery_showroom
    [
    {"caption":"Showroom","fields": [
    {"field":"gs_heading","caption":"heading"},
    {"field":"gs_galleryslides","caption":"Gallery Slider","inputTV":"mg.gallery"}
    ]}
    ]


    showroom.html
    <ul>
    [[getImageList? &tvname=`mg.gallery` &tpl=`@FILE:assets/templates/chunks/mg.gallery.html`]]
    </ul>
    [[getImageList? &tvname=`mg.gallery_showroom` &tpl=`@FILE:assets/templates/chunks/mg.gallery_showroom.html`]]


    mg.gallery.html
    <li>[[+g_image]]</li>


    mg.gallery_showroom.html
    [[getImageList? &value=`[[+gs_galleryslides]]` &tpl=`@CODE:[[+g_image]]<br>`]]


    ------------------------------------------------------------------------------------------------

    Offtopic:
    Apparently "inputTVtype":"richtext" diplays a table instead of the default textarea if no richtext-editor is installed, "inputTVtype":"textarea" works as expected. Is this normal behavior?

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

    [ed. note: alex.gr last edited this post 10 years, 8 months ago.]
      Alex G - Application Development Apprentice | New MODX User
      codeblick media
    • discuss.answer
      • 4172
      • 5,888 Posts
      you can't use a TV, which is or ever was assinged to a template/resource, as a inputTV for MIGX.
      This might produce conflicts between the Resource-TV and the MIGX-field.
      I'm always using "inputTVtype":"migx","configs":"my_migx_config" for nested MIGX-fields
      and do the configuration for formtabs and columns with the MIGX-configurator-CMP

      "inputTVtype":"richtext" shouldn't show a grid, but the currently active richtext-editor.
      If you see a grid, then something went wrong, there

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 49560
        • 28 Posts
        Alright guessed this might be the issue, I'll try out the configs. Thanks!
          Alex G - Application Development Apprentice | New MODX User
          codeblick media