// Get parent page title $parentObj1 = $modx->resource->getOne('Parent'); $parentpageid1 = $parentObj1->get('id'); $doc = $modx->getObject('modDocument',$parentpageid1); $newValue = "YES"; $doc->setTVValue(30, $newValue); // redirect $url = $modx->makeUrl(12); $modx->sendRedirect($url); return true;
This question has been answered by dubbs. See the first response.
$url = $modx->makeUrl(12, "", "", "full");
I'd suggest this change. It will make the redirect more reliable:
$url = $modx->makeUrl(12, "", "", "full");