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: JimKillock at Dec 09, 2010, 11:50 AM

    [[!getResources?
    &parents=`2`
    &limit=`2`
    &showHidden=`1`
    &tpl=`ListTitleOnly`
    ]]
    This works in one MODx context, but not another. The same MODx template is being used. So it seems that getresources may be breaking when calling resources from another context?
    See the context property at http://rtfm.modx.com/display/ADDON/getResources#getResources-SelectionProperties
      • 37514
      • 178 Posts
      Thank you! Good when things are easily resolved smiley
        • 25287
        • 81 Posts
        How do I filter TV’s to end up with all the resources that include the value being filtered for, and not just ones that only include that value?

        I have a multi-select check-box TV that I want to be able to filter on. The following code results in the records that ONLY have the value selected, but not those that have several values selected (including the filtered value)
        [[!getResources? &parents=`13` &tpl=`gr-portfolios` &depth=`2` &tvFilters=`Cloudscapes` &includeTVs=`1` &processTVs=`1` &hideContainers=`1` &tvPrefix=`` &showHidden=`1` ]] 


        The value being sought/filtered here is ’Cloudscapes’. I had tried
        [[!getResources? &parents=`13` &tpl=`gr-portfolios` &depth=`3` &tvFilters=`Sections==Cloudscapes` &includeTVs=`1` &processTVs=`1` &hideContainers=`1` &tvPrefix=`` &showHidden=`1` ]] 
        but that also produces the same results.

        I’m reasonably sure it is a matter of getting the &tvFilters paramater right, but have not managed it so far.

        I’m using Revolution 2.0.5 & getResources 1.2.2
          • 22303 MODX Staff
          • 10,725 Posts
          &tvFilters=`Sections==%Cloudscapes%`
            • 25287
            • 81 Posts
            Thanks for the reply Jason.
            That works perfectly, another piece of the puzzle solved. Is there anywhere that lists those search conditions so i can learn about it without having to bother others?

            I’m trying to get tags produced by the tagLister snippet to point to pages like the one the code is on. The tag for ’Cloudscapes’ from tagLister points to http://localhost/modrev/categories/?tag=Cloudscapes&key=tags, but the page I’m trying to link to is http://localhost/modrev/categories/cloudscapes

            The code I’m using to pruduce the tags is
            [[*Sections:notempty=`[[!tolinks? &items=`[[*Sections]]` &key=`Sections` &outputDelim=` | ` &target=`44`]]`]]

            Resource 44 is an empty container (Categories) with the pages to be populated below it.

            Linking the tagLister results with the getResources call is the final piece of the puzzle for me. Then I can add more content, upload and publish the site.

            Thanks again.
              • 21106
              • 53 Posts
              I’ve dug into the forum but I can’t seem to find a similar discussion.

              Does getResources support dynamic parents call? I remember Ditto to have this function but I can’t get it to work using &parents=`[[+id]]`.

              Any information is much appreciated.

              Happy Holidays!

                • 27382
                • 9 Posts
                I’m unclear of the purpose of the &processTVs attribute.

                On the testing that I’ve done, the &includeTVs attribute is all that is needed to include TVs. Including (or not including) &processTVs doesn’t change the outcome.

                Looking at the code, it doesn’t seem to serve a particular purpose. I’m sure it does and I’m just missing it smiley

                Could you clarify?

                Thanks so much for building this for Revo!
                  • 10257
                  • 55 Posts
                  It will become clear, if you change the output of a TV.

                  I have a galleryItem which is rendered as galleryItem. When you just use &includeTVs, you will get the raw galleryItem. If you use the additional &processTVs, you will get an image...
                    • 11055 ☆ A M B ☆
                    • 3,112 Posts
                    @opengeek,
                    I tried to find the workaround for tvFilters, so it can be used as AND relationship rather than OR.
                    Do you have a suggestion?

                    Or would you explain me further about ’the primary grouping mechanism’ ?
                      Rico
                      Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                      MODx is great, but knowing how to use it well makes it perfect!

                      www.virtudraft.com

                      Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                      Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                      Maintainter/contributor of Babel

                      Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                      • 17723
                      • 221 Posts
                      Is there a way to crate a full url to a resource like in a Wayfinder would be a parameter: &fullLink=`ture` ?

                      Luke
                        Lucas from AroundCyprus.net