Mecha CMS

Code snippet collection for developers.

Disable Comments on Static Pages

Disable comments on pages that are relative to the root URL.

Disable comments on pages that are relative to the root URL like http://example.com/about. Requires comment extension.

<?php if ($site->has('parent')): ?>
<?php static::comments(); ?>
<?php endif; ?>