maddoger / yii2-website
Website manager extension for Yii2.
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
This package is not auto-updated.
Last update: 2024-11-09 17:24:56 UTC
README
Yii2 Website manager by maddoger
Installation
- clone
- migrate: ##yii migrate --migrationPath=@maddoger/website/common/migrations##
- modules:
'modules' => [ ... 'website' => 'maddoger\website\frontend\WebsiteModule', 'website-backend' => 'maddoger\website\backend\WebsiteModule', ... ],
Text formats
Yii->$app->params['textFormats'] => [ 'text' => [ 'label' => 'Text', //no widget, simple textarea 'formatter' => function ($text) { return Yii::$app->formatter->asNtext($text); } ], 'md' => [ 'label' => 'Markdown', //no widget, simple textarea 'formatter' => function ($text) { return yii\helpers\Markdown::process($text, 'gfm'); } ], 'html' => [ 'label' => Yii::t('maddoger/website', 'HTML'), 'widgetClass' => '\vova07\imperavi\Widget', ], 'raw' => [ 'label' => Yii::t('maddoger/website', 'Raw'), ], ],
URL rule
'<languageSlug:[\w-]+>/<slug:.*?>' => 'website/page/index',