breadlesscode/neos-commentable

There is no license information available for the latest version (v1.1.4) of this package.

Neos CMS plugin for commenting nodes

Installs: 1 376

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 3

Open Issues: 0

Type:neos-plugin

v1.1.4 2019-02-04 15:17 UTC

This package is auto-updated.

Last update: 2024-04-17 15:12:35 UTC


README

Latest Stable Version Downloads License GitHub stars GitHub watchers

A package for Neos CMS for commenting nodes.

Installation

Most of the time you have to make small adjustments to a package (e.g., the configuration in Settings.yaml). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site package located under Packages/Sites/. To install it correctly go to your theme package (e.g.Packages/Sites/Foo.Bar) and run following command:

composer require breadlesscode/neos-commentable --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Your desired package is now installed correctly.

Usage

1. Extend your document

You have to add the mixin Breadlesscode.Commentable:Mixin.Commentable to your commentable node. This mixin in simply adds a child node where the comments are stored.

2. Render the comments

Now you can add a the Breadlesscode.Commentable:Collection.Comment Fusion-Prototype to your node. This is a simple Neos.Neos:ContentCollection which lists the comments.

3. Add the form

This Package provides a simple form implementation Breadlesscode.Commentable:Form.Comment. This form adds the comment to the current document node comment collection. You can simply add a finisher by extend the Fusion-Prototype:

prototype(Breadlesscode.Commentable:Form.Comment) {
    finishers {
        sayThankYou = Neos.Form.Builder:FlashMessageFinisher.Definition {
            options {
                messageTitle = 'Thank you!'
                messageBody = 'Thanks for your comment'
            }
        }
    }
}

If you want to use your own Form implementation, you should add the correct finisher Breadlesscode.Commentable:From.Finisher.AddComment.

Configuration

Breadlesscode:
  Commentable:
    # should the comment be added to the top?
    addToTop: true
    # should comments be hidden by default
    hidden: true

License

The MIT License (MIT). Please see License File for more information.