Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module adds special attributes to view rows and fields when the entity ID in the view's argument matches the current entity, helping to visually mark the active item. It currently works with the Table display style and is being expanded to support more.

Synopsis

Provides a Views argument handler which accepts an entity ID: it assumes this entity ID is the same entity type as the base_table of the current view. If it notices the ID passed in the argument matches the ID of a row in the results, it adds an HTML data-views-mark-current="current-entity--row" attribute to the row; and an HTML data-views-mark-current="current-entity--field" attribute to each field in the row.

Currently, it only adds attributes to views' Table style, but support for more styles are coming.

While this module will work with all views display types, it was built with the Attachment, Block, Embed, and Entity Views Attachment (EVA) display types in mind, i.e.: where the module's views argument handler can get the current entity from the context of the page the view is displayed on.

Requirements

  1. Drupal core's views module.

Roadmap

Currently this module only adds attributes to the supports the Table style; but support for the Grid, HTML List, and Unformatted list styles are planned.

Adding support for the Entity Reference list, OPML and RSS styles will need some discussion before they can be implemented, because those machine-readable formats don't have the data- attributes feature of HTML, and thus would be harder to indicate which is the current row. Please file an issue if you need this module to support one of these styles.

Additional tests are also always welcome: they make accepting patches much easier!

Known problems

We don't know of any problems right now. Let us know about one by filing an issue!

Credits

This module was originally written by M Parker (mparker17) at Consensus Enterprises for Health Canada's Health Products and Food Branch (HPFB).

Current maintainers:

We don't know of any similar projects right now. Let us know about one by filing an issue!

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Slowing

Releases

Version Type Core Release date
2.0.0-rc1 Pre-release 10–11 Apr 9, 2025
2.0.x-dev Dev 10–11 Oct 15, 2024