Blog Sections Open
Importing a Content Tree from One Evolution CMS Site into Another
A practical export-and-import pattern for moving a structured content branch between Evolution CMS sites when direct table copying is unsafe.
Copying a content tree between two Evolution CMS projects sounds simple until the destination site already has its own structure and IDs. At that point, raw table copying becomes risky very quickly.
the article proposed a safer pattern: export the source tree as structured data, then rebuild it through the API on the target site.
Export on the source site
<?php
define('MODX_API_MODE', true);
define('IN_MANAGER_MODE', false);
include_once('index.php');
$modx->db->connect();
if (empty($modx->config)) {
$modx->getSettings();
}
$modx->runSnippet('DocLister', [
'parents' => 0,
'showParent' => 1,
'display' => -1,
'tvPrefix' => '',
'tvList' => 'images,price'
]);
Rebuild on the destination site
On the receiving site, the import script can read the exported structure, remap parents, and create resources through the API instead of trying to preserve source IDs one-to-one.
include_once(MODX_BASE_PATH . 'assets/lib/MODxAPI/modResource.php');
$file = file_get_contents('https://your-site.com/export.php');
eval($file);
$docs = $docs['docs'];
The important idea is not the exact code. It is the workflow: export clean data, rebuild the tree deliberately, and keep parent mapping under your own control.
That makes this a strong legacy article to preserve, because migrations between live Evolution projects are common, and the “just copy tables” shortcut is often the wrong answer.
Showing Product Cards as a Grid by Default
A quick storefront note on making the catalog open in grid mode by default instead of a row-based list layout.
Calling FormLister from Blade on Evolution CMS 2.0.3
A troubleshooting guide for FormLister calls inside Blade templates on Evolution CMS 2.x projects.