Mecha CMS

Add extra functionality to the core engine.

Comment

Table of Contents
  1. Installation 
  2. Comment Flags 

Built-in commenting system.

Download Version 1.16.0 Download Development Version

Something looks broken? We accept bounties to fix them faster.

Installation 

The comment system will be activated automatically, but you need to manually install the comment area in the layout file. Edit .\lot\layout\page.php file then put this snippet just after the </article> tag:

<?= self::comments(); ?>

Comment Flags 

Set specific comment visibility through page properties. Add a comment property within your page’s state property with one of these values:

ValueDescription
0Disable comments.
1Enable comments (default).
2Disable comments, but keep the published comments visible.
falseAlias for 0.
trueAlias for 1.

Example:

---
title: Page Title
description: Page description.
author: Taufik Nurrohman
type: Markdown
state:
  comment: false
...

Page content.

To set pre-defined comment visibility globally, specify a comment flag on the first array of the layout arguments:

<?= self::comments([2]); ?>