We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    This is an auto-generated support/comment thread for ListRelated.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    This snippet was designed to show a list of pages that are related based on specified keywords
      follow me on twitter: @dimmy01
      • 18436
      • 135 Posts
      HI, gonna be upgrading to version 0.9.2 tonight as I’m currently using version 1.0 beta. I’d like to post a feature request, namely that ListRelated be updated to evaluate TV’s in the result array in a similar fashion to how ditto handles it.

      This is the scenario I’m faced with: I publish a set of documents that form part of a bi-monthly magazine issue, I’ve used a text tv called issueDate which is basically a date range that the documents fall under i.e. March | April 2006, default value is @INHERIT. My reasoning is to set this on the parent folder i.e issue 04 and have all children inherit the value.

      I then use this tv value within the description and introtext fields. Over the course of the last six months I’m slowly discovering/implementing ways to minimise manual modifications to data.

      Ditto correctly parses the values, however ListRelated seems to be a bit behind the times, I know it doesn’t have the tv parsing functionality included but it also doesn’t support using a chunk as an output template.

      This is probabely not the right place to state this but it would be great if ditto could implement the same functionality as ListRelated without having to "tag" your documents. I think it makes an excellent replacement for {SNIPPET} newslisting and should be focused on as the core distributed document list outputing snippet.

      Many thanks.
        • 4295
        • 98 Posts
        Does anyone know if ListRelated supports the ability to set the folder start ID like other snippets? (example: &startId=`xx`) I didn’t see that mentioned in the documentation -- if it doesn’t -- that would make this a much more versatile snippet. Thanks.
          • 7455
          • 2,204 Posts
          mm why would you need an id to start from? it uses the keywords (metatag keywords) to make a list of related articles site wide.

          so no need for a start id just select the keywords and it wil search for documents that have the same keywords selected and build a list from those documents.
            follow me on twitter: @dimmy01
            • 4295
            • 98 Posts
            Dimmy, thanks for the reply but one shoe doesn’t always fit all. Being able to set a start folder is a handy parameter as you don’t always wish to search site-wide but only documents within specified folders. For instance, on the same sets of similar pages, I have a need to search documents from a specific folder/children -- in another area of the same pages, I need to be able to search only documents from an entirely different folder/children. The need to restrict related documents to specific folders is not uncommon and a start folder parameter would be very helpful. Being restricted to only site-wide just doesn’t work in many cases. Just a thought for added functionality.
              • 8835
              • 21 Posts
              neat snippet, thanks.
              I needed a "sort by menuindex" though - which I added.
              So just in case ... it’s attached to this post.

              and I agree it might come in handy to be able to restrict it to folders ...
                ▙▚▚▜ I don't think I can, you see, I'd have to want to ▙▚▚▜
                • 23050
                • 1,842 Posts
                Anyone uses this snippet on a 0.9.6 install ?

                I can’t get it run... Nothing shows up.

                I have an article with keyword aaa, bbb, ccc and other article with bbb, ccc, ddd.
                I should see a link as articles has 2 keywords... Am I wrong ?

                I tried [[ListRelated]], [!ListRelated!] but nothing.

                Version of php is 5.2.3.

                Thanks for help wink
                  • 28359
                  • 9 Posts
                  Hi,

                  I just tried it on a 0.9.6.1 but it gives a MODx Parse Error: says ... SQL syntax error near ’ORDER BY date DESC LIMIT 10’ at line 12 and the following:

                  SQL: SELECT DISTINCT content.id, content.pagetitle, content.description, content.menuindex, IF(content.pub_date > 0, content.pub_date, content.createdon) AS date FROM `mysite_modx`.modx_site_content AS content, `mysite_modx`.modx_keyword_xref AS xref, `mysite_modx`.modx_site_keywords AS keywords WHERE keywords.keyword IN (’fun’,’functional’,’good stuff’) AND xref.keyword_id = keywords.id AND content.hidemenu = 0 AND content.id = xref.content_id AND content.id != ORDER BY date DESC LIMIT 10;


                  I’m on FreeBSD running Apache 1.3.39
                  MODx version 0.9.6.1 rev 3118
                  PHP Version 5.2.4
                  MySQL version 5.0.45

                  Can anyone help? Thanks.
                    • 7455
                    • 2,204 Posts
                    Quote from: Perrine at Aug 11, 2007, 12:34 PM

                    Anyone uses this snippet on a 0.9.6 install ?

                    I can’t get it run... Nothing shows up.

                    I have an article with keyword aaa, bbb, ccc and other article with bbb, ccc, ddd.
                    I should see a link as articles has 2 keywords... Am I wrong ?

                    I tried [[listRelated]], [!ListRelated!] but nothing.

                    Version of php is 5.2.3.

                    Thanks for help wink

                    Did you set a description for your pages?

                    works fine by me on 096
                      follow me on twitter: @dimmy01
                      • 23050
                      • 1,842 Posts
                      Hi Dimmy, a description ? Do you mean that I have to fill in METAs description ? I thought ListRelated was only based on keywords ?

                      Anyway, my question was for a projet I worked on August 07... I have found a solution so don’t worry wink Thanks !