How to create an extension dropdown config option in Magento 2

- Fire development, Magento 2

Magento 2 Development

To create an extension’s dropdown config option in Magento 2 check the core example: «Catalog» → «Storefront» → «List Mode».

The following code is the field XML declaration:

Please note that :

type=”select” defines the dropdown control, while

<source_model>Magento\Catalog\Model\Config\Source\ListMode</source_model> defines the dropdown items.

Source

More tips from the Cookbook