We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37614
    • 10 Posts
    Good afternoon. I have a problem with the address of pictures. There is a folder, it is the conclusion of documents with pictures. The bottom line is that the image file name is displayed correctly, but the folder resource that creating with MIGX (tutorial http://rtfm.modx.com/display/ADDON/MIGX.Use+resource-specific+mediasource+and+multifile-uploader) why it is taken from the container.

    Array
    (
        [MIGX_id] => 1
        [image] => /assets/resourceimages/73/DSC_0121.JPG
        [deleted] => 0
        [_alt] => 0
        [_first] => 1
        [_last] => 1
        [idx] => 1
        [property.tvname] => resourcealbum
        [property.docid] => 80
        [property.limit] => 1
    )
    Array
    (
        [MIGX_id] => 6
        [image] => /assets/resourceimages/73/214837-1680x1050.jpg
        [deleted] => 0
        [_alt] => 0
        [_first] => 1
        [_last] => 1
        [idx] => 1
        [property.tvname] => resourcealbum
        [property.docid] => 78
        [property.limit] => 1
    )
    


    Infer a Getresourtses. Perhaps the reason is
    [[migxResourceMediaPath? & pathTpl = `assets / resourceimages / {id} /`]]
      • 4172
      • 5,888 Posts
      aren't the pictures for the resource 73 stored under this directory: /assets/resourceimages/73/ ?

      [Edit]

      Ah, I see you are using getResources and in the getResources the getImageList-snippet.

      try

      [[getImageList?
      &processTVs=`0`
      .
      .
      .
      ]]
      


      and in your tpl-chunk:

      /assets/resourceimages/[[+property.docid]]/[[+image]]


      [ed. note: Bruno17 last edited this post 13 years, 11 months ago.]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37614
        • 10 Posts
        I bring in resources 73:

        [[!getResources?  
            &parents=`[[*id]]` 
            &tpl=`tplListPortfolio`    
            &includeContent=`1`    
            &includeTVs=`1` 
            &processTVs=`1`
            ]]


        tplListPortfolio:

        <div class="item-portfolio">
        <h2>[[+pagetitle]]</h2>
        <p>[[+introtext]]</p>
          [[!getImageList?
            &docid=`[[+id]]`
            &tvname=`resourcealbum`
            &tpl=`thumbTpl`
            &limit=`1`
          ]]
        </div>
        


        thumbTpl

        <img src="[[+image]]"/>
          • 37614
          • 10 Posts
          GREAT! Thanks!
            • 37614
            • 10 Posts
            How, then, to use return phpthumof in tpl-chunk?
              • 4172
              • 5,888 Posts
              you can try to create an output-filter-snippet 'add_before' with this code:

              <?php
              return $options.$input;
              


              and use it this way:

              [[+image:add_before=`/assets/resourceimages/[[+property.docid]]/`:phpthumbof=`w=.........`]]


              does this work?

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

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 37614
                • 10 Posts
                Yes. thanks!
                  • 37614
                  • 10 Posts
                  Yes. thanks!