Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Comment on top

Security covered Under active development 1 sites

This module allows you to pin a specific top-level comment, along with its replies, to the very top of a node's comment section. An optional submodule can automatically pin the most-liked comment.

The Comment on top module pins one top-level comment, together with its replies, to the top of a node's comment list.

3.x uses Drupal's default comment list. You do not need a Views block, and you should not hide the Comments field. The current stable release is still 2.0.3, which uses the older Views setup below.

Features

Drupal's default comment order is by date. This module lets you pin one favorite top-level comment above the others. Replies stay with their parent; they cannot be pinned on their own.

On a node with comments, roles with permission see "Stick on top" under each top-level comment, and "Remove from top" on the pinned one.

The submodule Comment on top by likes can pin the most liked top-level comment automatically (likes minus dislikes), using the Like/Dislike module.

Post-installation (3.x)

See the README: 3.0.x README.

  • Requires the core Comment module and a Comments field left enabled in Manage display.
  • On Drupal 11.4 Standard, create a content type, a comment type, and a Comments field first.
  • Grant "Administer Comment on top" at /admin/people/permissions/module/comment_on_top.
  • Optionally disable the feature for some comment types at /admin/config/content/comment-on-top.
  • Use "Stick on top" / "Remove from top" on a node with comments.

For likes pinning, enable the submodule, add a Like/Dislike field to the comment type, then enable comment types at /admin/config/content/comment-on-top/by-likes (or per node under Comment settings).

A theme may override the pinned comment with comment--pinned-on-top.html.twig.

Uninstallation (3.x)

Uninstall Comment on top by likes first if it is enabled, then Comment on top, at /admin/modules/uninstall. You do not need to remove a Views block or restore the Comments field.

Drupal 10–11

Ask your assistant about Comment on top

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • comment Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
16
Tracked since
Oct 2023
Latest release
3 weeks ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.1.6 Stable 8–10 Dec 11, 2023
1.1.5 Stable 8–10 Dec 8, 2023
1.1.4 Stable 8–10 Nov 23, 2023
1.0.1 Stable 8–10 Oct 26, 2023
1.0.0 Stable 8–10 Oct 19, 2023
1.0.x-dev Dev 8–10 Oct 18, 2023