Hi All,
@Susan: how would i get all values from site_tmplvar_contentvalues?
$tvs = $xpdo->getIterator('modTmplVars', array('tmplvarid' => 8));
doesn't sem to work
@BobRay:right now i have this function
function array_move(&$a, $oldpos, $newpos) {
if ($oldpos==$newpos) {return;}
array_splice($a,max($newpos,0),0,array_splice($a,max($oldpos,0),1));
}
and it works fine. i can move the elements i the array and the order goes fine. the problem is how to get the values for rank.
when i try to get the values for rank (the old and the new value for a particular resource) i do this
switch($eventName) {
case 'OnBeforeDocFormSave':
$told = $resource->getTVValue('rank');
break;
case 'OnDocFormSave':
$tnew = $resource->getTVValue('rank');
break;
}
onBeforeDocFormSave i can retrieve the 'old' value for rank
and on onDocFormSave i can retrieve the 'new' value for rank. But i can not retrieve both at the same time. and i need them for my sorting function.
Is there a way to retrieve the value for the new rank, so the value thats filled in in the form, onBeforeDocFormSave?
I tried to use $form->getTVValue('rank') bur thats not working
Tnx
RDG