Improving HtmlFormat to send currentPath information to templates