This project is not covered by Drupal’s security advisory policy.

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!

Supporting organizations: 

Project information

Releases