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

    I have a MIGX with input (for image, I use imagePLUS) :

    [{"caption":"home_banner", "fields": [
    {"field":"naam","caption":"naam"},
    {"field":"beschrijving","caption":"beschrijving","inputTVtype":"richtext"},  {"field":"afbeelding","caption":"afbeelding","inputTVtype":"imageplus"},  {"field":"image_option","caption":"image_option","inputTVtype":"option","inputOptionValues":"rechts==rechts||full==full"}
    ]}
    ]


    and grid

    [
    {"header": "naam", "width": "160", "sortable": "true", "dataIndex": "naam"}
    ]



    and output "standard".

    I render this with

      [[!getImageList? 
        &tvname=`home_banner_image`
        &tpl=`home_banner_tpl`
    
    ]] 
    


    This is the "home_banner_tpl":



              <div class="item [[+image_option]]" style="background-image: url([[+afbeelding]])">
                         <div class="banner-content">Heb je<br>een vraag<br>voor ons?</div>
                         <div class="">
                            <div class="row slide-margin">
                               <div class="col-sm-5 col-sm-offset-2 col-xs-12">
                                  <div class="carousel-content">
                                [[+beschrijving]]
                                  </div>
                               </div>
                            </div>
                         </div>
                      </div> 
    


    When I use in the tpl-file [[+afbeelding]], I get :

    { "sourceImg": { "src": "images/home-banner1-vierkant.jpg", "width": 290, "height": 290, "source": 1 }, "crop": { "width": 290, "height": 290, "x": 0, "y": 0 }, "targetWidth": 0, "targetHeight": 0, "altTag": false }

    How can I "extract" the "src" of this please ?

    Thanks for the help !

    I am searching for hours for this, but I didn't find a solution (as I am a humble newbie smiley
      • 4172
      • 5,888 Posts
      imageplus has a snippet, which you can use to render its image
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 4172
        • 5,888 Posts
        http://jako.github.io/ImagePlus/usage/#snippet

        you will need

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

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 47717
          • 144 Posts
          Quote from: Bruno17 at Aug 14, 2015, 10:45 AM
          http://jako.github.io/ImagePlus/usage/#snippet

          you will need

          &value=`[[+afbeelding]]`

          Thanks Bruno !

          This did the trick in the TPL file for the [[!getImageList?

          [[ImagePlus? 
          &tvname=`[[+home_banner_image]]` 
          &value=`[[+afbeelding]]`
          ]]