We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2740
    • 95 Posts
    It would be great if there was a ’Related’ snippet for Revolution as there is for Evolution. ’Related’ simply creates one-to-many and many-to-many relationships between MODx documents in the manager.

    For one project I’m likely to choose Evolution ahead of Revolution just to use this snippet.
      • 19534
      • 183 Posts
      You may tag your resources and then use the getResourcesTag snippet from the tagLister Add-on.

      To be able to use getResourcesTag to display related resources I added a &tag parameter to the getResourcesTag snippet (see this pull request on GitHub).

      Assuming your tag TV is called ’tag’ and your resources are children of resources 4,12 and 33 your code would look like this:

      [[!getResourcesTag? &parents=`4,12,33` &tag=`[[*tag]]`]]
      


      Cheers,
      Jakob
        Add-On to easily manage your multilingual sites: Babel
        • 2740
        • 95 Posts
        Thanks Jakob for your suggestion. I’ll have a go with it this week.
          • 31876
          • 33 Posts
          Sorry to ask that but...

          Do we need to download the last version from Github to have this fonctionality?
          Or can we install it from Package management and it will be the last version?

          Cheers
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            Don’t be afraid to ask.

            And usually the package manager has the last release.

            Github holds the development so will usually be slightly ahead of the release, but it may not have been properly tested.


            From what I can see, that tag pull request wasn’t added yet so you’d need to grab it from the commit.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 31876
              • 33 Posts
              Thanks.
              I downloaded from Github,

              but it doesn’t work for me huh

              Jakob, would it be possible for you to explain a little little more about this implementation?
              I need this feature to complete my website with Revo, I tried that for a few days, looking in the forums without success..

              maybe I don’t do it correctly, so I have this question :

              I have an article with TV for tags, which contains a comma delimited list of keywords.
              I would like to show in the sidebar others documents tagged with the same keywords (at least one of them)

              is it possible to grab relative documents filtering with a tv which outputs a comma delimited list of tags with &tag parameter you implemented?



              Any help would be greatly appreciated!
                • 19534
                • 183 Posts
                Hey!

                As Mark H. wrote: my pull request has not been accepted by Shaun yet. So if you download his code from GitHub you don’t have my changes, too. The changes I’ve made a fairly simply you may apply them by your self or wait untill my pull request is accepted: https://github.com/splittingred/tagLister/pull/15#diff-0
                  Add-On to easily manage your multilingual sites: Babel
                  • 31876
                  • 33 Posts
                  Thanks Jakob,

                  I changed the snippet with your code now,
                  your implementation of &tag is (I think tongue) what I need to make relative posts lists,

                  but for now, I can’t have it working,
                  I’m not a MODx expert, but I always try to find a solution by myself before I ask any question.

                  Maybe the feature of &tag isn’t what I think, maybe the syntax of the call is not the good one.
                  This is why I asked you a little description of the tool. I know documentation takes time to do so..

                  I tried that code to aggregate related posts in the same document:

                  [[!getResourcesTag? &elementClass=`modSnippet` &element=`getResources` &parents=`9`  &tag=`[[*tags]]` &tagKey=`tags` &tpl=`related-thumb` &showHidden=`0` &hideContainers=`1` &includeTVs=`1` &processTVs=`1`]]


                  But it returns nothing..
                    • 2740
                    • 95 Posts
                    Although it’s possible I’m made a mistake as this is the first Rev site I’m creating but I get the same results as w2.
                      • 19534
                      • 183 Posts
                      My changes only support filtering by one tag. If you tag your resources with more then one tag my solution may not work...
                        Add-On to easily manage your multilingual sites: Babel