A module for publications

Installs: 41 526

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 7

Forks: 3

Open Issues: 0


1.3.0-beta3 2023-06-13 13:38 UTC

This package is auto-updated.

Last update: 2024-06-14 15:15:08 UTC


A module for publications


The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist dmstr/yii2-publication-module "*"

or add

"dmstr/yii2-publication-module": "*"

to the require section and

    "type": "vcs",
    "url": ""

to the repositories section of your composer.json file.


Once the extension is installed, simply use it in your code by adding the two module to the module section of your config

'modules' => [
    'publication' => [
        'class' => dmstr\modules\publication\Module::class,
        'previewItemRole' => null // This describes a rbac role which allowed the user which has grants for this privilege to access the default detail action even if the item is not published

Run migrations from @dmstr/modules/publication/migrations.


Create widget-templates /widgets/crud/widget-template/index for teaser

    "title": "News Teaser",
    "type": "object",
    "properties": {
        "teaser": {
            "type": "string",
            "title": "Teaser",
            "default": "subline"

and content.

    "title": "News Content",
    "type": "object",
    "properties": {
        "content": {
            "type": "string",
            "title": "Content",
            "default": "Content"

Create a category, ie. News and assign templates to it.

Create an item.


Use variables from content schema in teaser template

{{ content.headline }}
{{ content.image }}