We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22446
    • 181 Posts
    I have a jot call out on my homepage. The Jot call out on the homepage displays the recent comments throughout my pages. I would like for my comments on the homepage to display the title of each page that the comment is from. Does anyone know how I can incorporate this into my jot comments template? I have tried [+pagetitle+] and no luck.
      • 1122
      • 209 Posts
      Right, using [+pagetitle+] leads to no result, because Jot does not understand/recognize this placeholder and therefore replaces it with empty text.

      Incorporating into Jot’s template a pagetitle that the comment is attached to consists of two parts: 1) obtaining the id of the page (it is kept in jot_content table), 2) fetching the pagetitle itself (kept in site_content table). However, this task is solveable within single statement -- you need to call Ditto in an appropriate place of your comment’s template:
      [[Ditto? &documents=`[+comment.uparent+]` &tpl=`parent-doc-title`]]
      

      The content of "parent-doc-title" chunk should be simply:
      [+pagetitle+]
      

      Important: [+pagetitle+] placeholder has to be separated from comment’s template into standalone chunk; do not try to place it within Ditto clause &tpl=`@CODE:[+pagetitle+]`, because Jot will parse it and replace with an empty text prior it is accessed by Ditto.
        • 22446
        • 181 Posts
        You are a life saver. Worked Perfectly. Thanks you!!