Normally, a macro only has access to the variables specifically passed in or the "default" template parameters (which is basically $xf
). In this case, the template isn't normally in $template
, it's in {$xf.reply.template}
so that should still work.
Macros do keep access to the current set of global variables within the $__globals
container, though you shouldn't need that here.