replace inline_template with variable substitutions