Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

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!

Activity

Total releases
1
First release
Apr 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
2.0.0-rc1 Pre-release Apr 9, 2025