We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43810
    • 62 Posts
    [Under MODX Evolution]

    Is it possible to get the url of the first image of a resource? So that pass it then on to Ditto forming on a page list of the child pages with thumbnails? I do not want Ditto to use images from image TVs assigned to the child pages.
      • 37582
      • 65 Posts
      If you do not want to get the image from TVs from the child pages (i.e. the resources), where do you want to get it from?

      The way I understood you is: You want a list of preview images linking to let's say articles with those images, right? If it is just a matter of size and picture ratio you could try phpThumbOf: http://rtfm.modx.com/display/ADDON/phpThumbOf
        • 7327
        • 195 Posts
        ROOT
        >> PAGE FOLDER 1
        ++++ CHILD 1
        ++++ CHILD 2
        ++++ CHILD 3
        >> PAGE FOLDER 2
        ++++ CHILD 1
        ++++ CHILD 2
        ++++ CHILD 3
        >> PAGE FOLDER 3
        ++++ CHILD 1
        ++++ CHILD 2

        In the above tree, do you mean getting only images from 'PAGE FOLDER #' AND NOT from their children?
          • 43810
          • 62 Posts
          Quote from: chrisissorry at May 24, 2013, 05:14 PM
          If you do not want to get the image from TVs from the child pages (i.e. the resources), where do you want to get it from?

          - There may be some "static" images on the page. Images may be put on the page by a gallery. So not all images are from TVs. And if there are several TVs? Would it not be less strain for mind just to catch the first image of a page, regardless the nature of its appearance there?

          Quote from: chrisissorry at May 24, 2013, 05:14 PM
          The way I understood you is: You want a list of preview images linking to let's say articles with those images, right? If it is just a matter of size and picture ratio you could try phpThumbOf: http://rtfm.modx.com/display/ADDON/phpThumbOf

          I prepare articles + thumbnails out of child pages by Ditto and a TV from each page. Image resize is done by TVimageResizer. But I will probably need phpThumbOf when I start with MODX Revolution. Right now it is about Evolution yet.
            • 43810
            • 62 Posts
            Quote from: diatomin at May 24, 2013, 09:40 PM
            ROOT
            >> PAGE FOLDER 1
            ++++ CHILD 1
            ++++ CHILD 2
            ++++ CHILD 3
            >> PAGE FOLDER 2
            ++++ CHILD 1
            ++++ CHILD 2
            ++++ CHILD 3
            >> PAGE FOLDER 3
            ++++ CHILD 1
            ++++ CHILD 2

            In the above tree, do you mean getting only images from 'PAGE FOLDER #' AND NOT from their children?

            I mean getting images + text from immediate children to their respective parent. Thumbnails + text from CHILDren to their respective PAGE FOLDER. And thumbnails + text from PAGE FOLDERs to ROOT. So just one tree of CHILD 1 + CHILD 2 + CHILD 3 to PAGE FOLDER 1 is enough for explanation.
              • 7327
              • 195 Posts
              In a way you want to grab images just like how Facebook auto detects image thumbs from links you paste into the wall poster?
                • 43810
                • 62 Posts
                Quote from: diatomin at May 25, 2013, 08:10 PM
                In a way you want to grab images just like how Facebook auto detects image thumbs from links you paste into the wall poster?

                I have no knowledge of how Facebook does it, so I can not discuss it. Back to MODX Evolution, there may be a way to get the url of the first image of a resource - I do not know how. May be it is not by Ditto, but the URL has to be passed on to Ditto in the end.