Skip to content

Default Plugin

Plugins for argument defaults in Views.

Argument default plugins provide default values for contextual filters. This can be useful for blocks and other display types lacking a natural argument input. Examples are plugins to extract node and user IDs from the URL.

Argument default plugins extend \Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase. They must be attributed with \Drupal\views\Attribute\ViewsArgumentDefault attribute, and they must be in namespace directory Plugin\views\argument_default.

See also

Plugin API

Parent topics

Views plugins