mage-os/module-page-builder-template-import-export
Composer 安装命令:
composer require mage-os/module-page-builder-template-import-export
包简介
PageBuilder template import/export module
README 文档
README
Enrich PageBuilder adding templates import/export management.
Overview
The PageBuilder Templates Import/Export module allows you to import and export pagebuilder templates through different magento instances. You can use it exporting zip templates file locally and move to remote instances or pulling directly from a configured dropbox storage.
🚀 Features
Export Template
Once the module is enabled you can export templates through adminhtml ui going to "Content > Elements > Templates" section clicking on the "Actions" column or through cli. For cli export execute the following command:
php bin/magento mage-os:pagebuilder_template:export
As result of export you will obtain a .zip file containing the template.
Import Template
You can import templates from adminhtml ui always from the "Content > Elements > Templates" section. At the top of the page you'll se a CTA "Import Template", clicking on it a modal opens with an "Upload button" find the zip file from the search window and select it. Cli command is also supported for import:
php bin/magento mage-os:pagebuilder_template:import
Remote Template Import
Once you've configured one or more dropbox apps with success you'll be able to see the remote templates stored there inside the "Import Template" modal. You will be able to filter them and import on you Magento instance clicking on "Import" link on "Action" column. Remote dropbox repositories are synced with configured in every dropbox app webhooks. An alignment is done once per day at 0:00 but you can also make a full alignment executing the following cli command:
php bin/magento mage-os:pagebuilder_template:update-remote-list
🔧 Installation
-
Install it into your Mage-OS/Magento 2 project with composer:
composer require mage-os/module-page-builder-template-import-export -
Enable module
bin/magento setup:upgrade -
Add consumer to queue consumer list (suggested)
Update your env.php file adding "pbTemplateImport" to consumers.
<?php return [ ... 'queue' => [ 'consumers_wait_for_messages' => 1 ], 'cron_consumers_runner' => [ 'cron_run' => true, ... 'consumers' => [ ... 'pbTemplateImport' ... ] ] ... ];
⚙️ Configuration
The module provides configuration options under Stores > Configuration > General > Content Management > Pagebuilder template import/export
General Configuration
- Enable: Enables or disables the module. This setting is configurable on global scope.
- Sync remote templates by cron: Let you decide to synchronize remote templates by cron (suggested for large sets of templates stored on remote. See point 3 of installation chapter) or directly after configuration save.
- Dropbox repositories: Allows you to specify the Dropbox apps from which to receive templates.
Dropbox repositories Configuration
To synchronize remote templates stored on a dropbox repository owned by a vendor you need to add a dropbox app. Follow these instructions:
- Specify a name
- Specify the app_key
- Specify the app_secret (see https://www.dropbox.com/developers/apps or get them from the dropbox app owner)
- Specify the refresh token
To synchronize remote templates stored on one of your own dropbox accounts add a dropbox app following these steps:
- Specify a name
- Specify the app_key
- Specify the app_secret (see https://www.dropbox.com/developers/apps and copy them)
- Click on "Generate and authorize refresh token" and follow the instructions to generate the one-time valid "access code"
- Paste "access code" inside the input below the "Refresh Token Generator" column and click the button
- Save the configuration clicking on the main configuration "Save" button
- If no errors where encountered during the saving process you'll be able to see a refresh token generated on the fifth column of the row you configured previously.
Congratulations! This credentials will be used for each dropbox api call to the related app storage. This configuration is managed as multi-row so you can add multiple dropbox apps related to different repositories simultaneously.
Dropbox app Creation
In order to connect Magento with dropbox you need to create a dropbox app related to it: https://www.dropbox.com/developers/reference/getting-started If you're configuring your own dropbox application for your Dropbox Account you must follow these steps:
- Select "Scoped Access" on "Choose an API" section
- Select "Full Dropbox" on "Choose the type of access you need" section
- Add an app name ex: "My Mage-OS Template Storage"
Dropbox app Configuration
The most important thing is setting the right permissions (following permissions are required):
- files.metadata.read
- files.content.read
If you are the owner on Dropbox space and you can manage the app directly you can also configure webhooks for realtime notification and sync. To do so, add your site webhook endpoint inside "Webhook URIs" section as follows: https://www.mysite.com/pagebuildertemplateie/template_remote/sync
If correct, your Magento instance will be updated realtime for any update on your Dropbox.
If you're not the owner of the Dropbox you must ask for webhook update to the owner.
🤝 Changelog
Please see CHANGELOG for more information on what has changed recently.
📄 License
The MIT License (MIT). Please see License File for more information.
mage-os/module-page-builder-template-import-export 适用场景与选型建议
mage-os/module-page-builder-template-import-export 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.92k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2025 年 10 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mage-os/module-page-builder-template-import-export 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mage-os/module-page-builder-template-import-export 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13.92k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 19
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-09






