Skip to content

Style

Plugins that control how the collection of results is rendered in a view.

Style plugins control how a view is displayed. For the most part, they are object wrappers around theme templates. Examples of styles include HTML lists, tables, full or teaser content views, etc.

Many (but not all) style plugins have an optional row plugin, which displays a single record. Not all style plugins use row plugins, so it is up to the style plugin to set this up and call the row plugin. See the Views row plugins topic for more information.

Style plugins extend \Drupal\views\Plugin\views\style\StylePluginBase. They must be annotated with \Drupal\views\Annotation\ViewsStyle annotation, and they must be in namespace directory Plugin\views\style.

See also

Plugin API

Parent topics

Views plugins