Notice: PyroCMS v 2.2.x is depreciated and is no long under development. This documentation is provided as-is, free of charge, for reference in existing websites.

Using Widgets

If you go to the Add-ons → Widgets section of the control panel, you'll see a list of widgets that are available to use.

To use those widgets, head on over to the Content → Widgets section, where you can creat widget instances and widget areas.

Widget Instances

Widgets store configuration values that you enter on the back end, and a collection of those configuration values is an instance. For example, when you set up an instance of a Google Maps widget, you set what size you want the map, what the map should show, etc. That instance is the re-usable.

Widget Areas

Widget areas are simply groups of widget instances. So, for example, you can have an area of widgets for your blog sidebar that you can arrange in the order that you'd like. Then, that area can be added using a simple tag syntax:

{{ widgets:area slug="sidebar" }}

Setting Up Widgets

The widgets interface has two separate seections: the available widgets on the left, and the widget areas on the right. To create a new area, go into the Area section.

To add a new widget instance to an area, drag it under the area until you see a dotted line area where you can drog the widget.

Widget Interface

Then, some configuration form inputs should appear.

HTML Widget

Fill those out, and you've got a widget instance!

Widget Area

Using Widget Instances Individually

Once you create an instance, you can use it in your template by specifying the instance id, even if that instance is in a widget area:

{{ widgets:instance id="6"}}

Widget Resources