Skip to main content
Drupal is a registered trademark of Dries Buytaert
EOL Warning: Drupal 11.0 has reached end of life and no longer receives security updates. Release: Private content 3.1.0 Minor update available for module private_content (3.1.0). Release: Webform Analysis 2.0.0 Major update available for module webform_analysis (2.0.0). Usage Milestone: Focal Point Module focal_point crossed 1,000 active installs. Release: Opensolr Search 4.3.1 Minor update available for module opensolr_search (4.3.1). Release: Opensolr Search 4.3.0 Minor update available for module opensolr_search (4.3.0). Release: Palette🎨 1.0.3 Minor update available for module canvas_palette (1.0.3). Release: Opensolr Search 4.2.4 Minor update available for module opensolr_search (4.2.4). Release: Changelogify 1.8.0 Minor update available for module changelogify (1.8.0). Release: Opensolr Search 4.2.3 Minor update available for module opensolr_search (4.2.3).

OGCB Likes

2 sites No security coverage Drupal 11 · not 10 Ogcb ecosystem
View on drupal.org

This module enhances content engagement by displaying a list of users who have liked a piece of content. It shows a concise summary of usernames, and clicking it reveals a full list in a dialog overlay. The display and sorting of these usernames are configurable.

About

Like counters tell you how many people liked something. On a
community site the more interesting question is usually who.

OGCB Likes provides a block that renders the users who liked the node you are
looking at as a compact, readable line — "Liked by Anna, Max and 3 others".
Every name links to the user profile, and the "3 others" link opens a dialog
with the complete list, rendered in whichever user view mode you configure. When
someone likes or unlikes the content, the line updates immediately without a
page reload.

The likes themselves are stored by the
Flag module. The module ships a
like_node flag as optional configuration; which content types it
applies to and who may use it stay under your control on the regular Flag
screens. OGCB Likes only handles the display side.

Features

  • Names instead of numbers — a summary line of linked
    usernames rather than an anonymous counter.
  • Full list in a dialog — the overflow link opens a native
    HTML dialog element with every liker, rendered in a configurable
    user view mode, so profile pictures and fields come along.
  • Live updates — liking and unliking updates the summary and
    the dialog client-side, with no page reload.
  • Configurable per block instance — how many names appear
    before they collapse into "and X others", sorting by date liked or by
    username, ascending or descending, and the user view mode.
  • Permission aware — the block is only rendered for roles
    that hold the flag like_node permission.
  • Themeable — a single Twig template with named blocks and a
    documented ogcb-likes-* class namespace.

Requirements

  • Drupal 11
  • PHP 8.3 or newer
  • Flag 5.x

Getting started

Install with composer require drupal/ogcb_likes and enable the
module. The like_node flag is created for you; open
Structure → Flags to pick the content types it applies to, and grant the
Flag Like (Node) permission to the roles that should be able to like
content. Then place the Likes block — it sits in the
Social category — on your node display via Block Layout or Layout
Builder, and set the summary limit, sorting and user view mode in the block
settings.

About the name

The module grew out of the Open Government Community Builder
(OGCB)
site template, which is where the ogcb_ prefix comes
from. It has no dependency on OGCB and works on any Drupal site that uses
Flag.

Supporting organizations

Development sponsored by erdfisch.

Depends on

Dependencies of the latest stable release

  • Flag
  • node Drupal core
  • user Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Apr 2026
Latest release
1 day ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.2 Stable 11 Aug 28, 2026
1.0.1 Stable 11 Jun 22, 2026
1.0.0 Stable 10–11 Jun 11, 2026
1.0.0-alpha2 Pre-release 10–11 Apr 23, 2026
1.0.0-alpha1 Pre-release 10–11 Apr 16, 2026