Last active
February 2, 2017 13:09
-
-
Save Burick/6c07820650d0d144baf440c4dcfda782 to your computer and use it in GitHub Desktop.
Включает скрытые в дереве ресурсы
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Включает скрытые в дееве ресурсы*/ | |
$q = $modx->newQuery('modResource', array('show_in_tree' => 0)); | |
$q->orCondition(array('hide_children_in_tree' => 1)); | |
$res = $modx->getCollection('modResource', $q); | |
foreach ($res as $v) { | |
$v->set('show_in_tree', 1); | |
$v->set('hide_children_in_tree', 0); | |
$v->save(); | |
echo $v->get('id').''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment