Widgets

The dashboard of the Control Panel may contain any number of widgets. A widget can contain anything you can think of. From a list of recent entries to a randomized inspiration quote.

Statamic comes bundled with a handful of widgets, however you may also create your own or use ones created by others.

Configuration

Widgets can be added to the dashboard by modifying the widgets array in the config/statamic/cp.php file.

Each item in the array should specify the widget as the type, plus any widget-specific configuration values.

You may use the same widget multiple times, configured in different ways.

Available Widgets

Collection

Display a listing of entries from a collection

[
	'type' => 'collection',
	'collection' => 'blog', // name of your collection
	'width' => 100,
	'limit' => 10
]

Form

Display a listing of form submissions.

[
	'type' => 'form',
	'form' => 'contact', // name of your form
	'width' => 100,
	'limit' => 10
]

Updater

Will display if updates are available

[
	'type' => 'updater',
	'width' => 100,
]

An example

'widgets' => [
    [
        'type' => 'collection',
        'collection' => 'blog',
        'width' => 50,
        'limit' => 10,
    ],
    [
        'type' => 'collection',
        'collection' => 'products',
        'width' => 50,
        'limit' => 10
    ],
    [
        'type' => 'form',
        'form' => 'contact',
        'width' => 100,
        'limit' => 20,
    ],
    [
        'type' => 'updater',
        'width' => '100',
    ],
],

Betterify this page on Github!