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

    I've been trying various ways to bring a existing gallery from an old flat file site into Modx.
    due to the number of images (all having title and descriptions etc) it's not feasible to use the Gallery plugin, as it would take all year to add all the information.

    The only thing I can think of is to use a collection, so that each image is it's own resource, and then I can import the data using importX.
    Then display them with getResources.

    My question is - if there are hundreds of images, will this slow down the site seeing as each image is a resource?


    It doesn't seem like a very practical solution, but the only one I can think of!

    I have already upload all the images into Modx, and have put each gallery in it's own folder.
    Thanks for any help on how people have migrated galleries n the past.
    Andy

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

      • 4172
      • 5,888 Posts
      if they are allready in a custom-table, you could probably use just that and manage it with a MIGXdb-TV or a MIGXdb-CMP
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 47717
        • 144 Posts
        Quote from: tm2000 at Jan 21, 2016, 03:30 AM
        Hi,

        I've been trying various ways to bring a existing gallery from an old flat file site into Modx.
        due to the number of images (all having title and descriptions etc) it's not feasible to use the Gallery plugin, as it would take all year to add all the information.

        The only thing I can think of is to use a collection, so that each image is it's own resource, and then I can import the data using importX.
        Then display them with getResources.

        My question is - if there are hundreds of images, will this slow down the site seeing as each image is a resource?


        It doesn't seem like a very practical solution, but the only one I can think of!

        I have already upload all the images into Modx, and have put each gallery in it's own folder.
        Thanks for any help on how people have migrated galleries n the past.
        Andy

        Hi,

        It wont slow down in my experience, if you use "pthumb" which is way faster and lightweight then phpThumbof.

        A second great secret, and one of my humble discoveries I could add to the Modx Forum is "xFPC"-caching.
        By using this, your site will be lightning fast.

        - http://rtfm.modx.com/display/ADDON/xFPC

        --> xFPC : download http://modx.com/extras/package/xfpc and upload NON-extracted package to core/packages + klik "lokaal zoeken voor plugins (submenu)"
        --> it will cache AUTOMATICALLY, no need to config, in core/cache/xfpc/



        Here is some simple code to quickly make a little gallery with migx and pthumb:

        -1- MAKE MIGX VAR
        output: standard



        FORM TABS:

        [
        {"caption":"Info", "fields": [
            {"field":"title","caption":"Title"},    {"field":"image","caption":"Image","inputTVtype":"image"}
        ]}
        ]


        GRID:

        [
        {"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"},
        {"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"}
        ]


        -2- Make loop that takes all images and shows them in a TPL


          [[!getImageList?
            &tvname=`image_tv`
            &tpl=`image_tv_TPL`]]



        -3- define the TPL for getimagelist


        <div class="item">
        <img src="[[pthumb? &input=`[[+image]]` &options=`w=180`]]"  title="... [[+title]]">
        </div>
          • 51020
          • 670 Posts
          Quote from: sriananda at Jan 21, 2016, 05:21 AM
          Quote from: tm2000 at Jan 21, 2016, 03:30 AM
          Hi,

          I've been trying various ways to bring a existing gallery from an old flat file site into Modx.
          due to the number of images (all having title and descriptions etc) it's not feasible to use the Gallery plugin, as it would take all year to add all the information.

          The only thing I can think of is to use a collection, so that each image is it's own resource, and then I can import the data using importX.
          Then display them with getResources.

          My question is - if there are hundreds of images, will this slow down the site seeing as each image is a resource?


          It doesn't seem like a very practical solution, but the only one I can think of!

          I have already upload all the images into Modx, and have put each gallery in it's own folder.
          Thanks for any help on how people have migrated galleries n the past.
          Andy

          Hi,

          It wont slow down in my experience, if you use "pthumb" which is way faster and lightweight then phpThumbof.

          A second great secret, and one of my humble discoveries I could add to the Modx Forum is "xFPC"-caching.
          By using this, your site will be lightning fast.

          - http://rtfm.modx.com/display/ADDON/xFPC

          --> xFPC : download http://modx.com/extras/package/xfpc and upload NON-extracted package to core/packages + klik "lokaal zoeken voor plugins (submenu)"
          --> it will cache AUTOMATICALLY, no need to config, in core/cache/xfpc/



          Here is some simple code to quickly make a little gallery with migx and pthumb:

          -1- MAKE MIGX VAR
          output: standard



          FORM TABS:

          [
          {"caption":"Info", "fields": [
              {"field":"title","caption":"Title"},    {"field":"image","caption":"Image","inputTVtype":"image"}
          ]}
          ]


          GRID:

          [
          {"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"},
          {"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"}
          ]


          -2- Make loop that takes all images and shows them in a TPL


            [[!getImageList?
              &tvname=`image_tv`
              &tpl=`image_tv_TPL`]]



          -3- define the TPL for getimagelist


          <div class="item">
          <img src="[[pthumb? &input=`[[+image]]` &options=`w=180`]]" title="... [[+title]]">
          </div>

          This is great thanks - The only reason I chose collections over Migx was that I can import all the data I need into the collection using a csv file and ImportX - but I cannot import the csv file into Migx - is that even possible? It's a one time import - just a way to migte the data without having to add each individual item - which isn't feasible. I can't seem to find an extra which allows me to import directly into a Migx tv?
            • 4172
            • 5,888 Posts
            Not a big friend of 'resources for everything' here.

            CSV-import is supported since 2.9.7
            https://github.com/Bruno17/MIGX/commit/87611f6f66ecd18d3e560a670f689d95820ac0be

            but not sure, if I would use a MIGX-TV, but MIGXdb, if there are many, maybe searchable images for each Resource.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 51020
              • 670 Posts
              Quote from: Bruno17 at Jan 21, 2016, 06:35 AM
              Not a big friend of 'resources for everything' here.

              CSV-import is supported since 2.9.7
              https://github.com/Bruno17/MIGX/commit/87611f6f66ecd18d3e560a670f689d95820ac0be

              but not sure, if I would use a MIGX-TV, but MIGXdb, if there are many, maybe searchable images for each Resource.

              Ok thanks for your input - so how do i use the import from CSV? I can't see any documentation on it.
                • 4172
                • 5,888 Posts
                within the MIGX-configurator-CMP you can add the action-button for importing CSV to MIGX
                Then you will have a new button above the MIGX-grid.
                When you click that button, you will get a Textarea, where you can put your CSV-Data for importing.
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                • discuss.answer
                  • 4172
                  • 5,888 Posts
                  not true.
                  you will get the file-browser, where you can select a CSV-file.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 51020
                    • 670 Posts
                    Quote from: Bruno17 at Jan 21, 2016, 08:52 AM
                    not true.
                    you will get the file-browser, where you can select a CSV-file.

                    Ah Ok - thank you for clarifying. I do find as a new user to Modx there are a lot of features that aren't easy to find, but are very powerful!
                    Thanks again
                      • 51020
                      • 670 Posts
                      Quote from: Bruno17 at Jan 21, 2016, 08:51 AM
                      within the MIGX-configurator-CMP you can add the action-button for importing CSV to MIGX
                      Then you will have a new button above the MIGX-grid.
                      When you click that button, you will get a Textarea, where you can put your CSV-Data for importing.

                      Sorry where do i find the MIGX-configurator-CMP?