PHPackages                             zucchi/widgets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zucchi/widgets

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

zucchi/widgets
==============

Alternative Widgets Module

0281PHP

Since Jan 6Pushed 10y ago2 watchersCompare

[ Source](https://github.com/phpboyscout/Silverstripe-Widgets)[ Packagist](https://packagist.org/packages/zucchi/widgets)[ RSS](/packages/zucchi-widgets/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Silverstripe-Widgets
====================

[](#silverstripe-widgets)

Alternative Widgets Module.

This module was inspired by a number of other guides and modules that are out their that will provide widget type functionality.

While its not a pretty or fully featured as the silverstripe/widgts module it allows you to use ANY type of form element as part of the widget which is not currently possible with the silverstripe widgets module (try using an UploadField in a widget)

*N.B.* Please note that this module does not currently handle requests for forms used in widgets. However this is a feature we hope to add in the future

Configuration
-------------

[](#configuration)

This module is Extension based and as such you will need to configure it to work with your silverstripe site.

In order to do this you can register the extension against your selected page by adding something like the following to your yaml config

```
Page:
  extensions:
    - WidgetPageExtension
```

This will attach a Single Relationship to Widgets. This essentially acts as a SideBar/WidgetArea and will automatically update the pages CMS fields.

If you wish to have more than one Widget area on a page you can do this by just manually defining a new `$many_many`relationship to Widget and adding the appropriate fields to your pages getCMSFields() method. For inspiration take a look at the code/WidgetPageExtension.php file

Creating Widgets
----------------

[](#creating-widgets)

While we anticipate providing some default widgets in the future that can be used with this module it is super simple to actually create a new widget. Below are the bare minimum instructions to create a widget

1. Create yourself a folder for your widget
2. Create an empty \_config.php in your new folder
3. Create a {WidgetName}.php file in your folder that contains the class `class {WidgetName} extends Widget {}`
4. Create a {WidgetName}.ss file in your folder with the required template you need for your widget

In your new php class you can define the fields and a getCMSFields() method in the same way you would any other DataObject

Rendering
---------

[](#rendering)

Each Widget relies on having a .ss file which is used in conjunction with a Widget::forTemplate() method.

There is also helper method that you can use in your template of $GetWidgets which will return your Widgets according to the sort order defined by your GridField.

The easiest way to render your widgets is to do the following

```

    {$forTemplate}

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/08fa7f499733c5518af69da8396025243cc2091ac38b5f7d146b04fe4b55fc4a?d=identicon)[mattcockayne](/maintainers/mattcockayne)

---

Top Contributors

[![phpboyscout](https://avatars.githubusercontent.com/u/175238?v=4)](https://github.com/phpboyscout "phpboyscout (4 commits)")

### Embed Badge

![Health badge](/badges/zucchi-widgets/health.svg)

```
[![Health](https://phpackages.com/badges/zucchi-widgets/health.svg)](https://phpackages.com/packages/zucchi-widgets)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
