Change template context variable logic to be as namespace type.