Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

views_mark_current

5 sites Security covered
View on drupal.org

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
Release cadence
Stability
0% stable

Releases

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