If I create a new TV and assign input type (say checkbox)...
and then assign it to a template.
How do I update all the pages with that TV?
Do I have to go and open each of the pages and select a value?
It does not update automatically if I set a default either...
Any pointers?
TIA
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
I don’t know if Batcher or Janitor would do that for you, but it’s worth checking.
Otherwise, you can write a fairly simple snippet, something like this:
$id = 12; // ID of the Template Variable itselfl
$tv = $modx->getObject('modTemplateVar',$id);
$resourceIds = array(1,3,4,5,6,7);
foreach($resourceIds as $resourceId)
$tv->setValue($resourceId,'value');
$tv->save();
Yes, that is the way to go Bob...
Janitor only has DB kind of stuff now...
and I also thought that Batcher could do it, but
it only plays with publish/unpublish, container/no container, etc...
document settings...
I am thinking on putting it as a Batcher feature in Redmine...
thanks for the snippet Bob, I will play with it...
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner