I have a chunk like this which is only shown to authenticated users, to allow them to logout.
Hi, [[+modx.user.username]] <a href="[[+logoutUrl]]">Sign out</a>
[[!Login? &tplType=`embedded` &errTplType=`embedded`]]
However, I find that the +logoutUrl placeholder is never written.
I believe that there is an error in the bottom of the Login snippet:
switch ($tplType) {
case 'embedded':
if (!$authenticated) $modx->setPlaceholders($phs); /* THIS STOPS IT WORKING! */
/* $modx->setPlaceholders($phs); THIS ALTERNATIVE SEEMS TO WORK! */
break;
case 'modChunk':
$output .= $modx->getChunk($tpl, $phs);
break;
case 'file':
$output .= file_get_contents($tpl);
$modx->setPlaceholders($phs);
break;
case 'inline':
default:
/* default is inline, meaning the tpl content was provided directly in the property */
$output .= $tpl;
$modx->setPlaceholders($phs);
break;
}
return $output;
?>
Does that seem like a likely bug and fix, or have I once again misunderstood how the whole shooting match works?