We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20349 ☆ A M B ☆
    • 453 Posts
    Thanks.

    I’m gonna give it a try and post the results wink

    In the meantime, do you have any other suggestion how to display related content? Maybe some examples of your cases & solutions for majority of sites....
    I have a lot of categories on my site (croevent.net) and it would be nice if I could connect the much as I can smiley
      BASE - Web Design Studio
      MODX Ambassador

      Website
      • 10449
      • 956 Posts
      MODx being MODx, you can achieve that in a variety of ways.

      e.g.
      - Work with keywords / tags (sample site of Evo features something like this in the blog pages)
      - Create a TV that expects a comma-separated list of related document ids + use Ditto to manage the frontend output
        • 10596
        • 18 Posts
        Hi, I got my snippet works written in REVO, but it still displays duplicate pagetitle I want to remove. it displays no duplication, check http://computingchannel.co.id in the article to see the script working.
        am definitely not a programmer, would love if anyone can contribute to modify the script better.
        also attach the output, here we go:

        1) My TV is: [[*unique_tag]] --> Input Type: Auto-tag; Output Type: default;

        2) I call my snippet in a template : [[!getRelated? &unique_tag_arr=`[[*unique_tag]]`]]

        3) The snippet: edited 15 Juli 2011 (still working till now)

        <?php
        $tag = explode(",", $unique_tag_arr);
        $count_tag= count($tag)-1;
        for ($i=0; $i<=$count_tag; $i++) 
        {
        $filterParam='unique_tag==%'.$tag[$i].'%';
        $pagetitleOutput = $modx->runSnippet( 'getResources', array(
                   'elementClass' => 'modSnippet', 
                   'element' => 'getResources',
                   'tpl' => 'tpl.relatedAtom',
                   'limit' => '3',
                   'parents' => '8,10',
                   'includeContent' => '1',
                   'includeTVs' => '1',
                   'showHidden' => '0',
                   'hideContainers' => '1',
                   'cache' => '0',
                   'processTVs' => '1',
                   'tvFilters' => $filterParam   
               )
           );
         $final_output[]=$pagetitleOutput;
         echo $final_output[$count_tag];
        }
        


        ​
          • 15034
          • 55 Posts
          dear gee, sorry, but it doesn’t works huh
            Мужчина должен говорить только три слова: люблю, куплю, поедем!
            • 25287
            • 81 Posts
            Would it be possible for someone to post a tutorial on how to display a list of related posts? What I’m trying to achieve is to display a list of tages used in the current resource as links. To then have those links point to a resource that displays summaries of each resource that includes the chosen tag.

            I have searched and tried for a few days now without getting too far. I have studied the docs anso referred to. The tutorial on how to create a blog http://rtfm.modx.com/display/revolution20/Creating+a+Blog+in+MODx+Revolution is detailed but covers a whole lot more than I’m looking for.

            So far I have been able to display the list of tags as links, with the call:
            <p class="centrealign">[[*Edition:notempty=`[[!tolinks? &items=`[[*Edition]]` &key=`Edition` &outputDelim=` | ` &target=`44`]]`]]</p>


            This uses the tolinks snippet to list the values from the ’Edition’ TV as a pipe-separated list of links. The links point to resource 44, which is an empty contaner resource.
            The aim is to have a dynamically created list of documents display on this page/resource.

            My guess is that this is not an uncommon feature request. So either lots of people have done this, or there may be others scratching their head too.

            Hoping someone can help.
              • 31876
              • 33 Posts
              I need same fonctionality (Revo), trying GetRessources, GetRessourcesTag for a few days too without success..

              If a tutorial like this on the documentation could be done for "related content" (maybe added to the one wich is already excellent), cause it is really a common feature request

              Cheers
                • 30703
                • 51 Posts
                @w2 - What problems are you having? I struggled with the getResourcesTag for a while too but I think I have a good understanding of it now.
                My main issues where the fact that I didn’t realise it was a "wrapper" for the ’getResources’ snippet so I wasn’t passing in some properties which were required. How far have you got with it?

                  Tom Dyer

                  Designer/Animator/Web Developer - England, UK.
                  http://www.bespokepixels.co.uk