How can I stop my TagHelper from rendering an outer tag?
e.g. I want something like:
<title>
<translate>LoginPageTitle</translate>
</title>
...so the tag helper can get the translation from the database and render just:
<title>Login to Foobar</title>
I can't see how to do anything other than rename the original tag at all, but I don't want any tag at all.
Here's my current code:
public class TranslateTagHelper : TagHelper
{
public string ResourceSet { get; set; } = "Global";
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
var content = await output.GetChildContentAsync();
string originalContent = content.GetContent();
output.Content.SetContent(@DbRes.T(originalContent, ResourceSet)); // Get translation from DB
}
}