I
I
Insom842021-07-14 17:06:54
MODX
Insom84, 2021-07-14 17:06:54

Freeze section url with all nested pages in Modx Rev?

Good afternoon.
How can I massively freeze the url of all nested pages of a section in modx revolution (there are a lot of them to do it manually for each separately). If only through the database, then please tell me what command?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Localhost, 2021-07-18
@selo

Execute the addition through the console, just specify your section " // section id "2""

$resources = $modx->getCollection('modResource',array('parent' => 2));   // id раздела  "2"
foreach ($resources as $res) {
    $res->set('uri-override', 1);                                        
    $res->save(); 
}

Don't forget to test first

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question