Skip to content

Instantly share code, notes, and snippets.

View alexburma's full-sized avatar

Oleksandr alexburma

  • Kharkiv, Ukraine
View GitHub Profile
@alexburma
alexburma / change_templates.php
Last active June 4, 2022 18:40
Modx Revo (auto-change templates)
<?php
$resources = $modx->getCollection('modResource',array('parent' => 1)); //1 is id of parent container
foreach ($resources as $res) {
$res->set('template', 2); // 2 is id of template
$res->save();
}