We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Quote from: gadamiak at Jul 27, 2010, 10:30 AM

    Quote from: paulmerchant at Jul 27, 2010, 09:46 AM
    The reason for getResourceField is because I like using simple tools for simple tasks. I didn’t feel like I needed getResources to grab a simple field value from a single resource.

    I agree with your point. However, I do prefer not to use many tools for the same task. Especially, when one tool is a special use case of the another.

    Moreover, the ability to get contents from arbitrary selected resource is highly demanded and useful feature and, in fact, should be included in the core itself or a core snippet, which getResources definitely is. The popularity of original getField proves it, IMO.
    IMO, efficiency is the best reason to use tools tailored for a specific task, and getResourceField is a very good example of why. And FWIW, I’ve never used getField on one of my sites (or Ditto for that matter), so I beg to differ with your proof. The core is the core. Extras are extras. This is MODx.
      • 36541
      • 222 Posts
      Quote from: OpenGeek at Jul 27, 2010, 05:01 PM
      IMO, efficiency is the best reason to use tools tailored for a specific task, and getResourceField is a very good example of why.

      I agree with that too and used exactly the same reasoning, when posted feature request for direct selection of resources in getResources. FWIW, it’s more efficient to operate on a collection than call a snippet for every item.

      I don’t neglect the need for a separate snippet like getResourceField. I just pointed out, that it’s usage is a special use case of getResources with a one-member collection.

      And FWIW, I’ve never used getField on one of my sites (or Ditto for that matter), so I beg to differ with your proof. The core is the core. Extras are extras. This is MODx.

      Quite the opposite in my case: I’ve used getField on each and every of my sites, as there have always been a need to fetch content from other resource(s) sooner or later. And that’s what I like MODx for -- the freedom of choice smiley
        This is the web: the only thing you know about who will come is that you don't know who will come.
        • 45467
        • 5 Posts
        I'm in need of assistance with getResources . I'm trying to figure out how to format my tpl chunk to display the catergories on a page in 4 columns. I don't understand how getresources knows when to start a new column or how to achieve these results:

        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4
        column1 column2 column3 column4

        Instead of:

        column1
        column1
        column1
        column1
        column1
        column1
        column1
        column1
        column1
        column1
        column1
        column1
        column1
          • 46407
          • 5 Posts
          I am not sure if i am in the right area but I would like to find out how to use getresources to do Pattern matches searches on my website. Just Like a Site search in a specific group of parent folders. I know there is a package called Simple search but was just wondering if this could be done with get resources.