hi,
the simple way to manipulate things on MODx events is to write your code in a plugin and then, set your plugin config to run on the event(s) you need it to
have swing
réfléchir avant d'agir
The TVs are not in the $scriptProperties array. You need to get them from the DB.
In Revo, the fastest way will be:
$tvId = 12;
$tv = $resource->getTVValue($tvIid); // where $id is the ID of the TV
If you need to alter the TV in the DB, however, it gets a little more complicated.