We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27889
    • 415 Posts
    One: thanks for this awesome snippet !

    My problem:
    I’m trying to use DittoCal with jot, I’ve made a template do generate a json page with comments.

    The idea is to display one comment using jot parameters [tt]pagination=`1`[/tt], but
    I don’t know how to generate a link with only one comment (or more if the’re more comment a day). I don’t understand the url parameters of jot to display them.
    http://www.bourlingueur.org/partagez/carnet_voyage/vietnam.html?jn176a012b=3#jotnav176a012bdfcda459448b224e498f386c
    the red part is the page number and it’s ok, but how can I get the yellow part ?

      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
      • 4195
      • 398 Posts
      Here are the querystring key names you can use.

      [+jot.querykey.action+]
      [+jot.querykey.navigation+]
      [+jot.querykey.id+]
      [+jot.querykey.view+]

      The yellow part is jot.querykey.navigation
        Armand Pondman
        MODx Coding Team
        :: Jot :: PHx
        • 27889
        • 415 Posts
        Thanks a lot for your quick answer, I’m going to try to implement this, stay tuned wink
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
          • 27889
          • 415 Posts
          Me again wink,
          I made my json file with this:

           {
           "title":"dittocalcarnet",
           "link":"http://www.bourlingueur.org/dittocalcarnet.html",
           "description":"",
           "language":"english",
           "copyright":"Bourlingueur.org 2006",
           "ttl":"3",
           "entries":[
          [!Jot?  &docid=`547` &subscribe=`0` &pagination=`100` &sortby=`createdon:a` &placeholders=`1` &output=`0` &canpost=`galerieposteur` &canedit=`galerieposteur` &tplComments=`jotTplCarnetComment`  !]
          [+jot.html.comments+]
          	}
           ]
          } 


          The results are ok:
           {
           "title":"dittocalcarnet",
           "link":"http://www.bourlingueur.org/dittocalcarnet.html",
           "description":"",
           "language":"english",
           "copyright":"Bourlingueur.org 2006",
           "ttl":"3",
           "entries":[
          
          {
          "title":"La préparation", 
           "link":"http://www.bourlingueur.org/partagez/carnet_voyage/dubai1.html?jn3fc04054=10",
           "date":"29-04-06",
           "guid":"http://www.bourlingueur.org/partagez/carnet_voyage/dubai1.html?10",
           "author":"NEGRONI Frederic",
            "description":"La préparation", 
            "summary":"",
          },{
          "title":"deroulement de la journée", 
           "link":"http://www.bourlingueur.org/partagez/carnet_voyage/dubai1.html?jn3fc04054=9",
          ......


          the call in the main page is : [tt][!Jot? &subscribe=`0` &pagination=`1` &sortby=`createdon:a` &placeholders=`1` &output=`0` &canpost=`galerieposteur` &canedit=`galerieposteur` !][/tt]
          in my "jotTplCarnetComment" tpl I’ve put the [+jot.querykey.navigation+] you tell me, but the link:
          "http://www.bourlingueur.org/partagez/carnet_voyage/dubai1.html?jn3fc04054=10"
          get me always to the first comment, whatever the red part is.

          I see in the code that the jnxxxxxxxx is generated with all the comment’s parameters, so is it logic that it differ from the one I display on the page. I’m trying to get it with a snippet or plugin to fill the json file’s links but with no luck.

          Have you an idea of why my links doesn’t work ?


            MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
            MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
            • 4195
            • 398 Posts
            you should then do a "hardcopy" of the jnXXXXXXXX string in your template.
              Armand Pondman
              MODx Coding Team
              :: Jot :: PHx