[[If? &subject=`[[*showLogin]]` &operand=`1` &then=`<div> [[ [[!If? &subject=`[[!+modx.user.id]]` &operator=`eq` &operand=`0` &then=`!Login? &tplType=`modChunk` &loginTpl=`loginFormTpl`` ]] ]] </div>` ]]
`<div> ` &operator=`eq` &operand=`0` &then=`!Login
This question has been answered by BobRay. See the first response.
&then=`!Login? &tplType=`modChunk` &loginTpl=`loginFormTpl``
The parser can't know the difference between the two ticks there.[[If? &subject=`[[*showLogin]]` &operand=`1` &then=`<div> [[!If? &subject=`[[!+modx.user.id]]` &operator=`eq` &operand=`0` &then=`[[!Login? &tplType=`modChunk` &loginTpl=`loginFormTpl`]]` ]] </div>` ]]
`<div> ` &operator=`eq` &operand=`0` &then=`[[!Login
!Login? &tplType=`modChunk` &loginTpl=`loginFormTpl`
[[*showLogin:eq=`1`:then=`<div>
[[!If?
&subject=`[[!+modx.user.id]]`
&operator=`eq`
&operand=`0`
&then=`[[$loginChunk]]`
]]
</div>`]]
[[!UserLogin]]
/* UserLogin snippet */
return $modx->user->hasSessionContext($modx->context->get('key'))
? $modx->getChunk('loginTpl')
: '';
return $modx->user->hasSessionContext($modx->context->get('key'))
? $modx->getChunk($scriptProperties['loginFormtpl'])
: '';