Fix example in template variable reference docs

Resolves #9067.