Download the PHP package pm4life/cmsinstaller without Composer
On this page you can find all versions of the php package pm4life/cmsinstaller. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pm4life/cmsinstaller
More information about pm4life/cmsinstaller
Files in pm4life/cmsinstaller
Package cmsinstaller
Short Description Magento 2 utility module for migrating/managing cms pages and block data from local environment to remote
License MIT
Informations about the package cmsinstaller
Magento 2 Cms Installer
Why? Because why not.
Usually when developing new or maintaining project there is a need for managing cms content.
This extension provides an option to export cms content to a .html
which can be added to project repository
and moved easily from local to development or production environment.
At least that's the general idea, could be totally wrong here, who knows, who cares.
Installation:
Download package from git or install it via composer with:
Next, enable module either via console command:
or by settings in admin: Admin > Stores > Configuration > General > Content Management > Cms Content Installer
Configuration
There are two options for cms templates, they can either be placed within app/design/frontend/cms_install
directory, or within certain allowed modules, this is controlled by admin setting, by default when extension is installed it is set to use app/design/frontend/cms_install
directory as template base.
By switching Install Template Base to Allowed Module(s) Directory
you have option to select any enabled module from app/code
space
The idea is to present options for developer to choose if for any reason it is more convenient to have them placed all at one location per project, or alternatively have templates separated per module within local space.
Usage
Template preparation and export
After editing on cms page or block is completed in local environment, these can be exported to make them available for moving from environment.
To create template exports there are two ways, first one with console command:
Where two parameters are passed --type
represents type of entity that is being exported, and --identifier
represents unique identifiers of given page/cms block.
If command is called without parameters it will export all available cms blocks and pages.
Besides this way, when application is in developer or default mode, a button is available in admin panel on cms page and block forms, which generates template export that can be placed in apropriate filesystem location depending on configuration settings from above.
Installing changes from templates to system
To apply changes from template files on remote environment run:
Changes to template files are tracked, so if you add changes to template file and run cms:installer:apply
command, that will result in given block or page being updated with those changes.
Additional features
You can also use this console command to run regeneration of all active cms page url rewrites Please take into account any customizations that you have on your store as this is not something that should be done on a regular basis.