I'm facing an issue with the rendered code in sitemap.
I need to render this code : <xhtml:link rel="alternate"...
But the :link is creating plain text rather than the proper xml display.
@helper RenderHrefLangEntries(IPublishedContent node)
{
if (node.Cultures != null)
{
foreach (var culture in node.Cultures)
{
var cultureKey = culture.Key;
var cultureUrl = EnsureUrlStartsWithDomain(node.Url(cultureKey, UrlMode.Absolute));
@Html.Raw($"<xhtml:link rel=\"alternate\" hreflang=\"{cultureKey}\" href=\"{cultureUrl}\" />")
}
}
}
I understand that the issue is related to the colon character. Is there an alternative way to display it correctly?
Sitemap rendering issue
Hello,
I'm facing an issue with the rendered code in sitemap. I need to render this code :
<xhtml:link rel="alternate"...
But the :link is creating plain text rather than the proper xml display.I understand that the issue is related to the colon character. Is there an alternative way to display it correctly?
Thanks
Based on the Umbraco official document I made this Service. I hope it will help you:
is working on a reply...