dmstr / yii2-publication-module
A module for publications
Installs: 44 253
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 7
Forks: 3
Open Issues: 0
Type:yii2-extension
Requires
- 2amigos/yii2-translateable-behavior: ^1.0.4
- dmstr/yii2-json-editor: ^1.0.0
- dmstr/yii2-widgets2-module: ^2.0.0
- insolita/yii2-adminlte-widgets: ~1.1
- kartik-v/yii2-widget-select2: ^2
- yiisoft/yii2: *
- yiisoft/yii2-twig: ^2.0.4
- zhuravljov/yii2-datetime-widgets: ~1.1.0
- dev-master
- 1.3.0-beta3
- 1.3.0-beta2
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- 1.0.0-rc3
- 1.0.0-rc2
- 1.0.0-rc1
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.5.0-alpha66
- 0.5.0-alpha65
- 0.5.0-alpha64
- 0.5.0-alpha63
- 0.5.0-alpha62
- 0.5.0-alpha61
- 0.5.0-alpha60
- 0.5.0-alpha59
- 0.5.0-alpha58
- 0.5.0-alpha57
- 0.5.0-alpha56
- 0.5.0-alpha55
- 0.5.0-alpha54
- 0.5.0-alpha53
- 0.5.0-alpha52
- 0.5.0-alpha51
- 0.5.0-alpha50
- 0.5.0-alpha49
- 0.5.0-alpha48
- 0.5.0-alpha47
- 0.5.0-alpha46
- 0.5.0-alpha45
- 0.5.0-alpha44
- 0.5.0-alpha43
- 0.5.0-alpha42
- 0.5.0-alpha41
- 0.5.0-alpha40
- 0.5.0-alpha39
- 0.5.0-alpha38
- 0.5.0-alpha37
- 0.5.0-alpha36
- 0.5.0-alpha35
- 0.5.0-alpha-34
- 0.5.0-alpha33
- 0.5.0-alpha32
- 0.5.0-alpha31
- 0.5.0-alpha30
- 0.5.0-alpha29
- 0.5.0-alpha28
- 0.5.0-alpha27
- 0.5.0-alpha26
- 0.5.0-alpha25
- 0.5.0-alpha24
- 0.5.0-alpha23
- 0.5.0-alpha22
- 0.5.0-alpha21
- 0.5.0-alpha20
- 0.5.0-alpha19
- 0.5.0-alpha18
- 0.5.0-alpha17
- 0.5.0-alpha16
- 0.5.0-alpha15
- 0.5.0-alpha14
- 0.5.0-alpha13
- 0.5.0-alpha12
- 0.5.0-alpha11
- 0.5.0-alpha10
- 0.5.0-alpha9
- 0.5.0-alpha8
- 0.5.0-alpha7
- 0.5.0-alpha6
- 0.5.0-alpha5
- 0.5.0-alpha4
- 0.5.0-alpha3
- 0.5.0-alpha-2
- 0.5.0-alpha1
- 0.4.5-beta1
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- dev-feature/main-filter-rework
- dev-feature/tag-groups
- dev-feature/audit-trail-behavior
- dev-feature/model-version-tab
- dev-feature/item-start-and-end-date
- dev-feature/ensure-array
- dev-dev/fix-item-status-default
- dev-feature/detail-title
- dev-feature/update-composer-dependencies
- dev-feature/fix-pg-migration
- dev-feature/postgres-support
- dev-dev/bug-fix-cleanup
- dev-feature/enable-di-overload
- dev-dev/better-interface
- dev-feature/twig-2
This package is auto-updated.
Last update: 2024-11-14 16:28:00 UTC
README
A module for publications
Installation
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": "https://git.hrzg.de/dmstr/yii2-publication-module.git"
}
to the repositories section of your composer.json
file.
Configuration
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
.
Usage
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.
publication/default/index?categoryId=1
Use variables from content schema in teaser template
{{ content.headline }}
{{ content.image }}