We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    Good morning!

    I am creating a site right now based off of the default install with sample site data in 0.9.6 and was wondering if it is possible someway to allow my admins (from the front end) to disable comments on certain posts. We want the capability to allow comments for some posts, but disable comments on others, similar to Wordpress.

    Is this possible and how can it be accomplished?

    Thanks in advance!
      • 11975
      • 2,542 Posts
      hi,

      I don’t know if there is a built-in feature in Jot to achieve this.

      I guess you could try to :

      create a TV = hasComment
      type=> option
      option values => yes||no
      default value=> no
      Attach the tv to the required templates

      Create a chunk containing the Jot Call : {{jotComment}}

      Then in your template

      add [*hascomment:isnot=`no`:then=`{{jotComment}}`*]

      :-)

      P.S: of course Phx plugin is required

        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 33337
        • 3,975 Posts
        Nice solution man!

        I would add the phx statement to [+jot.html.form+], so older comments will still be available.
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link