We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18436
    • 135 Posts
    I’m currently using placeholders in my form chunk but would like to be able to output a header saying "latest comments" if a document has comments associated with it. At the moment if I hardcode the header it looks a bit silly saying latest commetns with nothing listed followed by the comment form.

    I don’t know the PHx jot syntax to check for the existence, could any of you help me out?
      • 33033
      • 43 Posts
      [+myplaceholder:eg=`1`:then=`{{LatestCommentsChunk}}`:else=`{{NoCommentsChunk}}`+]

      That should work, but I don’t know what the placeholder for count-comments is (or even if there is one). Could try [+jot.count-comments+].


      I put a jot call in my Ditto tpl that will show X Comments:
      <p>[[Jot?&docid=`[+id+]`&action=`count-comments`]] Comments</p>

      But I’m not sure how to get that into a PHx call either, haven’t been able to do a lot of website work lately.