<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Массовое обновление TV-параметров у ресурсов]]></title><description><![CDATA[<p dir="auto">Бывают такие случаи когда можно запороть ТВ параметр с значениями по умолчанию, по этому возможно следующий скрипт вам поможет:</p>
<pre><code class="language-php">&lt;?php
$categoryId = 123; // ID категории
$tvName = 'my_custom_tv'; // Код TV
$newValue = 'Новое значение';

$criteria = [
    'class_key' =&gt; 'modResource',
    'parent' =&gt; $categoryId
];

$count = 0;
foreach ($modx-&gt;getIterator('modResource', $criteria) as $resource) {
    $resource-&gt;setTVValue($tvName, $newValue);
    if ($resource-&gt;save()) {
        $count++;
    }
}

echo "Обновлено TV-параметров: {$count}";
?&gt;
</code></pre>
]]></description><link>https://forum.exlends.ru/topic/123/massovoe-obnovlenie-tv-parametrov-u-resursov</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 09:11:35 GMT</lastBuildDate><atom:link href="https://forum.exlends.ru/topic/123.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 May 2025 09:16:32 GMT</pubDate><ttl>60</ttl></channel></rss>