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

    As noob - I am trying to get more and more into Migx, Modx and now also in getResources.
    I'm using this code here to get items I'm putting into a TV called "Services".

    
    [[!getResources? 
    &tpl=`get_list` 
    &parents=`0`
    &includeTVs=`1`
    &processTVs=`1`
    ]]


    When I change the $parents value to something different than 0, I get nothing shown.
    Now I would like to have the latest three Items shown on my homepage.
    To get all Items shown is working.

    I tried to use
    &limit=`3` 
    - but this is not working...

    this is the "get_list" chunk:

    [[!getImageList? 
        &tvname=`services`
        &tpl=`span4`
        &docid=`[[+id]]`
      ]]


    Any suggestions?

    Thank you!

    AD


      • 4172
      • 5,888 Posts
      do you get anything, when you change your get_list -chunk to:

      <h3>[[+pagetitle]]([[+id]])</h3>
      [[!getImageList?
          &tvname=`services`
          &tpl=`span4`
          &docid=`[[+id]]`
        ]]


      and you don't need

      &includeTVs=`1`
      &processTVs=`1`


      here, since you are not calling TVs by getResources directly here.

      also I think you can call your snippets cached here:
      [[getResources.........


      and

      [[getImageList.........


      this may give you a bit more speed, after the page is in the cache.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42101
        • 125 Posts
        He Bruno - thanks for the reply.

        I tried your code:

        <h3>[[+pagetitle]]([[+id]])</h3>
        [[!getImageList?
            &tvname=`services`
            &tpl=`span4`
            &docid=`[[+id]]`
          ]]


        I am getting the Pagetitle and the number of the startpage and the 2nd page I am adding the items to.

        And I deleted the unneeded parameters.

        AD
          • 4172
          • 5,888 Posts
          and you have something in your MIGX - TV on that two pages?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 42101
            • 125 Posts
            and you have something in your MIGX - TV on that two pages?
            ...no - only in one page - "services"

            The idea is to get the 3 latest "items" out of the migx Stream of "services" to "home".

            Or am I wrong with that idea? I mean, it's working like it should. The only thing not working is to limit the count of showing up posts/items.

            thank you!
            AD

              • 4172
              • 5,888 Posts
              then you don't need getResources at all, if I understand you correctly.

              just

              [[!getImageList?
                  &tvname=`services`
                  &tpl=`span4`
                  &docid=`hereTheIDofYourServices-Resource`
                  &limit=`3`
                ]]


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

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 42101
                • 125 Posts
                then you don't need getResources at all, if I understand you correctly.
                Huch!
                Oh Bruno - I am sorry for the hurry. Right indeed. It's working!

                I guess I really don't know what than getResources are good for...I didn't know that the call would be so easy then without them.

                  &tpl=`3`


                at least I changed that to
                  &limit=`3`
                - and everything works now. Every day a little bit to learn.

                Thank you very much!!!

                AD

                  • 4172
                  • 5,888 Posts
                  glad you got it working.
                  sorry, should be &limit=3` - changed it above.

                  you need getResources, if you want to filter,sort,list.... modx-resources.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 42101
                    • 125 Posts
                    you need getResources, if you want to filter,sort,list.... modx-resources.

                    thanks for the info. Now I understand it!
                    I am sure, that I will have more questions in the future.

                    Thanks
                    AD