intermundia / yiicms
Package contains core models, migrations, behaviors, controllers etc. For the Yii2 CMS
Installs: 781
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 5
Forks: 1
Open Issues: 5
Type:yii2-extension
Requires
- apollo11/yii2-logger: ^v1.3.0
- kartik-v/yii2-widget-select2: *
- yiisoft/yii2: ~2.0.0
- dev-master
- v4.0.5
- v4.0.4
- v4.0.3
- v4.0.2
- 4.0.1
- 4.0.0
- v3.0.15
- v3.0.14
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- v2.5.4
- v2.5.3
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.0
- v2.3.37-rc
- v2.3.36-rc
- v2.3.35-rc
- v2.3.34-rc
- v2.3.33-rc
- v2.3.32
- v2.3.32-rc
- v2.3.31
- v2.3.30-rc
- v2.3.29-rc
- v2.3.28-rc
- v2.3.27-rc
- v2.3.26-rc
- v2.3.25-rc
- v2.3.24-rc
- v2.3.23-rc
- v2.3.22-rc
- v2.3.21-rc
- v2.3.20-rc
- v2.3.19-rc
- v2.3.18-rc
- v2.3.17-rc
- v2.3.16-rc
- v2.3.15-rc
- v2.3.14-rc
- v2.3.13-rc
- v2.3.12-rc
- v2.3.11-rc
- v2.3.10-rc
- v2.3.9-rc
- v2.3.8-rc
- v2.3.7-rc
- v2.3.6-rc
- v2.3.5-rc
- v2.3.4.1
- v2.3.4.0
- v2.3.4-rc
- v2.3.3-rc
- v2.3.2-rc
- v2.3.1-rc
- v2.3.0-rc
- v2.2.0-rc
- v2.1.0-rc
- v2.0.0-rc
- v1.2.8
- v1.2.7
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.3-rc
- v1.2.2
- v1.2.2-rc
- v1.2.1
- v1.2.1-rc
- v1.2.0
- v1.2.0-rc
- v1.1.18
- v1.1.17
- v1.1.16
- v1.1.15
- v1.1.14
- v1.1.13
- v1.1.12
- v1.1.11
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.5-rc
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.6-rc
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-fix-linked-content-bug
- dev-master-v2
- dev-fix-filemanager-path-copy
- dev-dev-v2
- dev-fix-copy-language
- dev-fix-find-content-tree-by-full-path
- dev-multisite-domain-config-improvement
- dev-update-website-copy
- dev-fix-go-to-parent-button-disable-check
- dev-clear-chache-on-update-delete
- dev-url-generation-fix
- dev-only-language-specific-pages
- dev-relative-storage-url
- dev-multisite-live-editing
- dev-multisite-url
- dev-search-in-basemodel
- dev-multisite-url-fix
- dev-sync-search-fix
- dev-choose-from-existing-modal-fix
- dev-alias-language-url-fix
- dev-multisite-domain-frontend-backend-config
- dev-implement-filemanager-item-ordering
- dev-improvements-for-seed-project
- dev-corporate-data
- dev-website-update-fix
- dev-dev
- dev-move-backend-logic-into-core
- dev-timeline-events-as-separate-module
- dev-backend-restrictions
- dev-language-picker-widget
- dev-sitemap-xml-generation
- dev-ckeditor-airmode
- dev-image-optimization
- dev-add-new-html-helper
- dev-website-specific-timeline-events
- dev-fix-alias-generation
- dev-url-replace-problems
- dev-create-copy-helper-class
This package is auto-updated.
Last update: 2024-11-12 19:21:44 UTC
README
Package contains core models, migrations, behaviors, controllers etc. for the Yii2 CMS
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist intermundia/yiicms "*"
or add
"intermundia/yiicms": "*"
to the require section of your composer.json
file.
Upgrading from single site to Multi site
Important!!!
Make sure you do not override ContentTree::getActiveTranslation
and BaseModel::getActiveTranslation
methods
-
Add user component in
console/config.php
'user' => [ 'class' => \intermundia\yiicms\web\User::class, 'enableSession' => false, 'identityClass' => \intermundia\yiicms\models\User::class ]
-
Add controllers in
console/config.php
'sync' => [ 'class' => \intermundia\yiicms\console\controllers\SyncController::class, ], 'utils' => [ 'class' => \intermundia\yiicms\console\controllers\UtilsController::class, ],
-
Configure
mulsitecore
component incommon/config/base.php
If you want to have different domains for different environments, better to create ignored file and include insidemultisitecore
config'websites' => [ 'website key1' => [ 'defaultContentId' => "content tree id", 'masterLanguage' => 'en-US', "storageUrl" => 'storage url', "domains" => [ 'domain1' => 'en-US', 'domain2' => 'en-US', ] ], 'website key2' => [ 'defaultContentId' => "content tree id", 'masterLanguage' => 'en-US', "storageUrl" => 'storage url', "domains" => [ 'domain1' => 'en-US', 'domain2' => 'en-US', ] ] ]
###[Update]. Each domain now can correspond to associative array in the following format
'domain1' => [ 'language' => 'en-US', 'isProduction' => false, 'isFrontend' => true ]
Full Example:
'mywebsite.com' => [ 'defaultContentId' => 1234, 'masterLanguage' => 'en-US', "storageUrl" => 'mywebsite.com/storage/web', "domains" => [ 'mywebsite.com' => [ 'language' => 'en-US', 'isProduction' => true, 'isFrontend' => true ], 'admin.mywebsite.com' => 'en-US', // You can leave en-US as string which means that isProduction and isFrontend both are false ] ]
-
Add console script to run core migrations in
./migrate
bash script as the first linephp console/yii migrate --migrationPath=@cmsCore/migrations
-
Run migration
./migrate
-
For switch language from 'en' to 'en-US'
php console/yii utils/switch-language en en-US
-
Read languages from multiSiteCore websites and insert it in language table
php console/yii sync/languages
-
Add websites in contentTree
php console/yii sync/websites
-
Make
frontend/controllers/ContentTreeController
to be extend of core'sFrontendContentTreeController
-
To copy the website content when you have already run
php console/yii sync/websites
php console/yii utils/copy-language $fromWebsiteKey $toWebsiteKey $from $to
-
Copy language inside website
php console/yii utils/add-language $websiteKey $from $to
To update alias, alias-path for and corresponding file manager items run
php console/yii utils/fix-alias-and-file-manager-items $websiteKey
SluggableBehavior
will update alias
and alias_path
attributes for each record in content_tree_translation
table
that belongs to provided $websiteKey
.
Corresponding file_manager_item
records are also updated.
Usersnap
For usersnap website_translation model have two parameters, usersnap_code where one should input code from usersnap.com and type. There are 3 different types:
Disabled
. (in this case usersnap is not displayed)Always display
. (in this case usersnap is always visible)Display if url has usersnap=1 in get
(If you want to access usersnap and this option is selected, you should pass any get paramusersnap
to url once, which will save status in session and display usersnap untill session will expire or will be removed manually)