We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13226
    • 953 Posts
    Ive read through various posts in the forum and sadly havent been able to find a solution.

    I am trying to create a dynamic related posts section under my article/post.

    The call has to be dynamic as I have tons of content pages and dont want to have to select each individual related page

    I use Ditto for the posts with TvTagCloud to show the tags

    What my aim is:

    I have a TV "myTags" set-up as:

    Input Type: Check Box
    Input option values: @CHUNK Tags
    Widget: Delimited List
    Delimiter: ,

    Now that all is set-up, I would like to Dynamically show similar posts using the tags that were selected for the post from the "myTags" TV.

    e.g selected tags for my ID2: Tag1, Tag2, Tag26 - similar posts would be shown from other pages who also have the tags: Tag1,Tag2 and Tag26 selected

    Preferably with the option to show an image or text and to say how mant posts should be shown e.g &showposts`8`

    Has anyone been able to get something like this to work ??

    Any help would be appreciated smiley

    Cheers


    An example could be:

    Lots of page content here

    -----------------------------------------------------

    Readers who viewed this page, also viewed:




    Update: 21/12/2010
    No takers on this one ?
      • 13226
      • 953 Posts
      Thanks to a lot of forum reading, google searches and 3rd party websites, I have been able to get this sorted.

      After understanding a little more about how, why and what Ditto does when it actually filters stuff I found this post: "Related by tags (filter) how to?" and also found "Category Tagging with Ditto" in the wiki

      For those who are interested in showing related posts on their blog or gallery, try the following ditto call:
      [!Ditto? &filter=`id,[*id*],2` &parents=`[*parent*]` &tagData=`myTags` &tags=`[*myTags*]` &randomize=`1` &display=`4` &tagDelimiter=`,` &tpl=`RelatedTags` &showInMenuOnly=`0` &showPublishedOnly=`1`!]
      


      Change:
      &tagData=`myTags` - Change to your TemplateVariable where your tags are
      &tags=`[*myTags*]` - Change to your tags source or individual tags e.g &tags=`World,City,Bar1,Bar2,ArtBooksMusic`
      &tpl=`RelatedTags` - Change to your template source
      &display=`4` - Change to your display amount

      Hope it helps

      Cheers
        • 31876
        • 33 Posts
        Thanks! I need exactly same feature, but in Revo, it will help me to find the solution.
        I think this is about the same method with GetRessources.


          • 31876
          • 33 Posts
          Well...no.

          It seems GetRessources can’t do that easily, maybe i’m wrong but it seems it lacks those parametters Ditto has :

          &tagData=`myTags` &tags=`[*myTags*]`


          If anyone know the solution.. it would be appreciated!

            • 22840
            • 1,572 Posts
              • 31876
              • 33 Posts
              Yes I use TagLister to generate a list of used tags in the site, it’s working well for that, but I don’t see how I could use it to aggregate related documents (if possible).

              If someone could make some papers about "Ditto OR GetRessources" (maybe in the official documentation?) I think it would help Revolution (and me wink) because I found a lot of people having similar problems.

              Cheers
                • 2740
                • 95 Posts
                getResourcesTag is probably what you need. See:

                http://modxcms.com/forums/index.php/topic,58729.msg334962.html#msg334962
                  • 31876
                  • 33 Posts
                  Thanks banbbc, but for me it doesn’t work, no filter by tag when I call :

                  [[!getResourcesTag? &parents=`9` &tag=`[[*tag]]`]]


                  So I ask myself : is the &tag parametters already implemented in GetRessourcesTag we install in Package Management, as this parameter has been implemanted dec 19th?

                    • 2740
                    • 95 Posts
                    w2 I’ve just tried creating a list of related posts but ran into the same problem as you.

                    getResourcesTag would need to automatically get the tag(s) from the current shown document and create a related list. Having spent a couple of hours trying to achieve this I don’t think at present getResourcesTag can. Sorry to have wasted your time with the getResourcesTag suggestion.

                    Perhaps someone has achieved this using Ditto for Revolution until such time as getResourcesTag can?

                      • 31876
                      • 33 Posts
                      Yes it confirm what I think : We have to wait this feature to be implemented,
                      don’t be sorry I would have tried that anyway.

                      What surprised me : I tried with Ditto with the &tagData parameter whith normally would do it... but it seems it doesn’t work (maybe i’m wrong) with revo huh

                      I tried this tutorial :

                      http://wiki.modxcms.com/index.php/Category_Tagging_with_Ditto

                      doesn’t work.. undecided


                      I have my website 80% done with Revo now, and I have to choose between waiting this feature in Revo, or switching to Evo embarrassed

                      Anyway thanks for helping smiley