Added context/system settings replacement for template variable input option

Think you forgot my last pull request.

Another bug and fix: $modx->getChildIds seems to get not the right data in a multi context installation without setting the context key.