We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1800
    • 52 Posts
    Ok.. so i have http://arezombiesattacking.com/

    How it works is i have an archive folder and so i may have a page called "Dec 2, 2008" full of content. The homepage uses a ditto call to retrieve content like the answer for the day and [+content+].

    On some days I would like to make it so users can answer questions... the issue is that when they comment it ends up on the homepage and not the archive page.

    How do i make it so that if i call jot and someone comments the comment is added to the archive page?
      Minneapolis Web Design <-- where i work
      MODx Templates <-- new project im working on
      • 33337
      • 3,975 Posts
      I think you will have to play with placeholders, eg. switch off the output and generate placeholders. Then you can place the needed placeholders, and leave the un-needed out.

      Use one set on homepage, which involves only the comment form and the second on the archive page. I think there is some id parameter which tell Jot to post the comments to specific doc.

      See the wiki page for Jot, for more information.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 1800
        • 52 Posts
        Thanks.. here is how i did it...

        made a chunk called most_recent_id ... this finds the newest pub_date document in folder 9
        [[Ditto?startID=`9` &dateFormat=`%b %d, %Y` &hideFolders=`0` &descendentDepth=`1` &tpl=`most_recent_id_tpl`&displayArchive=`0` &total=`1` &summarize=`1` &showInMenuOnly=`1`]] 

        all the tpl does is grab the id of that document.. so..
        [+id+]


        So when i call {{most_recent}} it displays the id of the document w/ the highest pub_date in folder 9 (easy!)

        in my jot i did
        [!Jot? &cssFile=`jot.css`&captcha=`1` &customfields=`name,email` &subscribe=`1` &docid=`{{most_recent}}` &pagination=`50` &tplComments=`jot_tpl` &badwords=`dotNet` &canmoderate=`admin` !]


        It was going to be a real pain manually copying everyone’s answer.... thanks!
          Minneapolis Web Design <-- where i work
          MODx Templates <-- new project im working on
          • 1800
          • 52 Posts
          How do i make something so that...
          if id = 1 
            then ="{{most_recent}}" 
            else ="[~id~]"


          Since tommorow.. the most_recent id will change and if someone goes to this older page it will post to the newest page wrongly?
            Minneapolis Web Design <-- where i work
            MODx Templates <-- new project im working on
            • 1800
            • 52 Posts
            PHx to the rescue....
            [!Jot? &cssFile=`jot.css`&captcha=`1` &customfields=`name,email` &subscribe=`1` &docid=`[+phx:if=`[*id*]`:is=`1`:then=`{{most_recent}}`:else=`[*id*]`+]` &pagination=`50` &tplComments=`jot_tpl` &badwords=`dotNet` &canmoderate=`admin` !]
              Minneapolis Web Design <-- where i work
              MODx Templates <-- new project im working on