We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36805
    • 354 Posts
    I was inspired by Jasons arguments in the 5000 document limit thread. Basically he warned to make a MODx document for everything, especially for plain data.

    So instead I will use one single MODx document to display external ’documents’ from a custom catalog table. I will introduce a second GET parameter to identify my external ’document’ like so:

    http://www.mysite.com/index.php?id=111&fetch=85

    Where id is a MODx document and "fetch" identifies which record to fetch from my custom database.

    So I am new to Jot and I have an idea that might be a little bit crazy. What I want to do is use JOT to comment on my external ’documents’. I understand that to use JOT you need to pass a docid argument which identifies a MODx document (the article that is being commented). My MODx document however is always the same, only ’fetch’ changes. Would i break JOT if I’d pass it my ’fetch’ id instead?
      • 1122
      • 209 Posts
      Jot snippet already has feature for resolving this issue. Apart from docid parameter (identifying the MODx document that the comment is attached to) it also has additional tagid parameter -- used in the situation when you need to call (and distinguish) two or more Jot’s instances on the same MODx document. You can read about Jot’s parameters here http://wiki.modxcms.com/index.php/Jot#Parameters

      I think that you should try something of this kind:
      [[Jot? &docid=`111` &tagid=`your-fetch-value` ... ]]
      

      where 111 is MODx document used for displaying your "external documents" and "your-fetch-value" is an id of your "external document" itself. All comments will be attached to single MODx document, but through tagid you will be able to select/filter only those comments that belong to the specific "external document" currently being displayed by your MODx 111 document.
        • 36805
        • 354 Posts
        Cool, that’s exactly what I need! I wasn’t so sure about what the tagid does. Thanks!