We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36541
    • 222 Posts
    Quote from: MadeMyDay at Nov 09, 2010, 03:20 PM

    I just finished a version where you can sortby=`resources`...

    Based on this idea I took a different approach. I filed pull request #23 for it.
      This is the web: the only thing you know about who will come is that you don't know who will come.
      • 17422
      • 225 Posts
      Quote from: MadeMyDay at Nov 09, 2010, 08:41 PM



      I attached the modified getResources version. Here you can pass in your resources and they will be displayed in that particular order (&resources=`2,12,4` will display the resources in that order). Just use &sortby=`resources` and don`t set a parent. Just to be sure name it "getResourcesNew" or something like that and don’t overwrite the original one.


      I try to use your snippet but i have an error :
       [2011-01-03 16:45:16] (ERROR @ /index.php) Error 42S22 executing statement: 
      Array
      (
          [0] => 42S22
          [1] => 1054
          [2] => Unknown column 'modResource.resources' in 'order clause'
      )
      

        • 17883
        • 1,039 Posts
        Could you provide your gR-call?
          • 17422
          • 225 Posts
          [[!getResourcesNew? &resources=`[[*ArtistesTournee]]` &sortby=`resources` &tpl=`bloc_list_artiste` ]]

          [[*ArtistesTournee]] => 51,55,52,54,50,57,60,64,65,66,71,72,73
            • 22303 MODX Staff
            • 10,725 Posts
            There is no such column called resources, so you can’t sort by it, as the error reveals.
              • 3749
              • 24,544 Posts
              You might want pagetitle, alias, menutitle, id, createdon, editedon, or publishedon as your sort criterion.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 11076
                • 159 Posts
                OpenGeek:Quote from: OpenGeek at Jan 03, 2011, 10:31 AM

                There is no such column called resources, so you can’t sort by it, as the error reveals.


                lolotlm:Quote from: lolotlm at Jan 03, 2011, 10:00 AM

                [[!getResourcesNew? &resources=`[[*ArtistesTournee]]` &sortby=`resources` &tpl=`bloc_list_artiste` ]]
                MadeMyDay:Quote from: MadeMyDay at Nov 09, 2010, 08:41 PM

                ..I attached the modified getResources version.
                Here you can pass in your resources and they will be displayed in that particular order
                (&resources=`2,12,4` will display the resources in that order).
                Just use &sortby=`resources` and don`t set a parent.
                Just to be sure name it "getResourcesNew" or something like that and don’t overwrite the original one.
                wink
                  Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
                  • 33976 ☆ A M B ☆
                  • 571 Posts
                  @Bob, i guess it’s for MadeMyDay’s version of getResources (here) in order to use the custom TV checkboxSortable

                  @MadeMyDay, as i told you on twitter, i’m facing the same troubles/errors as lolotlm
                    • 3749
                    • 24,544 Posts
                    Ah ... Then this is perhaps posted in the wrong place.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 16861 ☆ A M B ☆
                      • 86 Posts
                      I have gone over the documentation, but must be missing something. Everything works with my getResource snippet except showing the image. The img src is empty.

                      Here is what I have for the call:

                      [[!getResources? &parents=`13` &tpl=`summary` &includeTVs=`1` &processTVs=`1` ]]


                      Here’s the chunk:

                      <table>
                      <tr>
                         <td><img src="[[+tv.tvThumbnail]]" style="width:100px;" alt="[[+pagetitle]]" /></td>
                         <td><p>[[+introtext]]<br />
                             <a href="[[~[[+id]]]]">Read the full story"</a></p></td>
                      </tr>
                      </table>


                      Your help is appreciated. Thanks!
                        Lee Brinckley
                        Manassas, VA (Washington DC)
                        Twitter - @leebrinckley
                        http://www.leebrinckley.com