PHPackages                             phundament/p3widgets - 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. phundament/p3widgets

ActiveYii-extension[Utility &amp; Helpers](/categories/utility)

phundament/p3widgets
====================

Widget Manager

0.17.2(12y ago)93045[4 issues](https://github.com/schmunk42/p3widgets/issues)2BSD-3-ClausePHPPHP &gt;=5.3.0

Since Jul 10Pushed 12y ago2 watchersCompare

[ Source](https://github.com/schmunk42/p3widgets)[ Packagist](https://packagist.org/packages/phundament/p3widgets)[ Docs](https://github.com/schmunk42/p3widgets)[ RSS](/packages/phundament-p3widgets/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (9)Versions (43)Used By (2)

\#Phundament 3 - Widgets

P3WidgetsModule provides basic Content Management System (CMS) functionality through a widget container for frontend-editing and a backend for managing widget properties and content.

A widget container tags its contents (widgets) by its id, the current controller and action and optionally also by a request parameter.

When you edit a widget you can specify its type (see config value modules\[p3widgets\].params\[widgets\]), its attributes by editing them with a built-in JSON editor and its content by editing it with a built-in ckeditor.

Database schema setup is done easily with yiic migrate.

\##Resources

- [Project page](https://github.com/schmunk42/p3widgets/)
- [Download](https://github.com/schmunk42/phundament/archives/master)
- [Join discussion](http://www.yiiframework.com/forum/index.php?/topic/20092-module-p3widgets/)
- [Try out a demo](http://demo.phundament.com/3.0-dev) (register an account by e-mail)
- [Report a bug](https://github.com/schmunk42/p3widgets/issues)
- [Phundament on github](https://github.com/schmunk42/phundament/)
- [Website](http://phundament.com)

Addon: [In-depth thread about general module management and a Yii-based CMS](http://www.yiiframework.com/forum/index.php?/topic/17591-planning-yii-cms-a-different-approach/)

\##Requirements

- Yii 1.1.8
- Database (tested with SQLite and MySQL)

\##Installation

1.

Extract into 'p3widgets'.

2.

Create a webapp by running

```
cd p3widgts
/path/to/yii/framework yiic webapp .

```

3.

Import database schema with yiic. Note: This command will create an own migration table for this module, it will not disturb your application migration table! Use your application yiic command.

```
> protected/yiic migrate \
    --migrationPath=application.modules.p3widgets.migrations \
    --migrationTable=migration_module_p3widgets

```

4.

Add contents from 'p3widgets/config/main.php' to the corresponding part in your application configuration.

```
return CMap::mergeArray(
    require(dirname(__FILE__).'/../modules/p3widgets/config/main.php'),
    ...

```

Available widgets from Yii, zii and yiiext:

```
	'modules' => array(
		'p3widgets' => array(
			'params' => array(
				'widgets' => array(
					'zii.widgets.CMenu'                             => 'Menu',
					'zii.widgets.CPortlet'                          => 'Portlet',
					'ext.yiiext.widgets.fancybox.EFancyboxWidget'   => 'Fancy Box',
					'ext.yiiext.widgets.cycle.ECycleWidget'         => array(
																			'name' => 'Cycle',
																			'checkAccess' => 'Admin'
																		),
					'CFlexWidget'                                   => 'Flex Widget',
					'ext.yiiext.widgets.swfobject.ESwfobjectWidget' => 'SWF Object',
					'ext.yiiext.widgets.lipsum.ELipsum'             => 'Lorem Ipsum Text',
				)
			)
		)
	),

```

If you want to add 'checkAccess' to a widget, just use the array notation. Use array key 'name' for the widget name, that appears in the widget dropdown. The array key 'checkAccess' to only allow specific users or groups access to a widget.

5.

Open /p3widgets/default/test or add a P3WidgetContainer to a view.

```
[php]
    $this->widget(
        'p3widgets.components.P3WidgetContainer',
        array(
            'id'=>'main',
            'checkAccess'=>false // disable checkAccess feature for debugging, default 'P3widgets.Widget.*'
            )
    );

```

Note: You should only disable the 'checkAccess' feature for debugging or testing. Make sure containers on the same page have different values for 'id'.

\##Usage

When logged in as 'admin' you should see a grey box around the containers and widgets with admin controls when you hover them. You can drag and drop widgets between containers. To move widgets across pages, edit their values for controller, action or requestParam.

\##Widget Examples

Widget class and content

\###CWidget

```
[html]
Hello World!

```

\###ECycleWidget

```
[html]

```

\###EFancyBoxWidget

```
[html]

```

Widgets taken from Examples from jQuery demo pages.

\##Known Issues

If you have widgets which have a custom `assetsUrl` property (eg. `FancyBoxWidget`), it is recommended to set this value to `NULL` with a skin file, to avoid conflicts with changing values in development and production environment.

> Note: If you're using themes, define the skin file in the theme which is active for `p3widgets/p3Widget/...`.

Error: `include(LoggableBehavior.php): failed to open stream: No such file or directory Fix: import class in config `vendor.sammaye.auditrail2.behaviors.LoggableBehavior`

\##Screenshots [![Backend](https://camo.githubusercontent.com/680b4151fad0069ba3f64e0ee1c39966999a700d35f97bf516bae2302f3b9c67/687474703a2f2f64656d6f2e7068756e64616d656e742e636f6d2f7075622f7033776964676574732f7033776964676574732d302e312d30312e706e67 "Backend")](https://camo.githubusercontent.com/680b4151fad0069ba3f64e0ee1c39966999a700d35f97bf516bae2302f3b9c67/687474703a2f2f64656d6f2e7068756e64616d656e742e636f6d2f7075622f7033776964676574732f7033776964676574732d302e312d30312e706e67)[![Frontend](https://camo.githubusercontent.com/d96fca0d242e206286e5b7e3ee5fb390dbeb54b8c54c165ac1e6d2f9e1c2d994/687474703a2f2f64656d6f2e7068756e64616d656e742e636f6d2f7075622f7033776964676574732f7033776964676574732d302e312d30322e706e67 "Frontend")](https://camo.githubusercontent.com/d96fca0d242e206286e5b7e3ee5fb390dbeb54b8c54c165ac1e6d2f9e1c2d994/687474703a2f2f64656d6f2e7068756e64616d656e742e636f6d2f7075622f7033776964676574732f7033776964676574732d302e312d30322e706e67)

\##Developer

```
git clone --recursive git://github.com/schmunk42/p3widgets.git \
  protected/modules/p3widgets
git clone --recursive git://github.com/schmunk42/p3extensions.git \
  protected/extensions/p3extensions
git clone --recursive https://github.com/schmunk42/gii-template-collection \
  protected/extensions/gtc

```

\##Contact Tobias Munk

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 91.6% 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.

###  Release Activity

Cadence

Every ~15 days

Recently: every ~29 days

Total

41

Last Release

4484d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (251 commits)")[![ametad](https://avatars.githubusercontent.com/u/1582541?v=4)](https://github.com/ametad "ametad (8 commits)")[![marc7000](https://avatars.githubusercontent.com/u/1118837?v=4)](https://github.com/marc7000 "marc7000 (8 commits)")[![Quexer69](https://avatars.githubusercontent.com/u/3859353?v=4)](https://github.com/Quexer69 "Quexer69 (6 commits)")[![damiandennis](https://avatars.githubusercontent.com/u/1276622?v=4)](https://github.com/damiandennis "damiandennis (1 commits)")

---

Tags

cmswidgetp3media

### Embed Badge

![Health badge](/badges/phundament-p3widgets/health.svg)

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

PHPackages © 2026

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