This question has been answered by BobRay. See the first response.
$phs = $modx->getPlaceholders();
foreach($phs as $key => $value) {
$_SESSION[$key] = $value;
}$_SESSION[$key] = $prefix . '.' . $value;
Is there any straightforward way of selecting which resource is to be displayed next?
$modx->sendRedirect($url);
$url = $modx->makeUrl($docId, "", "", "full"); $modx->sendRedirect($url);
I wouldn't think you'd need controllers or plugins, but I could be wrong.
Placeholders are not stored as $_SESSION variables. They're available with $modx->getPlaceholder() and $modx->GetPlaceholders(), but they don't survive past the current request, so you'd probably have to explicitly set them from the placeholders or whatever -- setting them as $_SESSION variables would probably be more secure than any alternatives.
Something like this might be useful (untested):
$phs = $modx->getPlaceholders(); foreach($phs as $key => $value) { $_SESSION[$key] = $value; }
You may want to add a prefix to avoid collisions, depending on how unique the names are:
$_SESSION[$key] = $prefix . '.' . $value;
Is there any straightforward way of selecting which resource is to be displayed next?
Sorry, I don't understand this question.
BTW, instead of messing with the header, you can do this:
$modx->sendRedirect($url);
or, if you have the doc id:
$url = $modx->makeUrl($docId, "", "", "full"); $modx->sendRedirect($url);