Skip to content

Instantly share code, notes, and snippets.

@soen
Created February 1, 2017 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soen/58f9e2dc0580635856f56015a6474b33 to your computer and use it in GitHub Desktop.
Save soen/58f9e2dc0580635856f56015a6474b33 to your computer and use it in GitHub Desktop.
public class CustomLinkRenderer : Sitecore.Xml.Xsl.LinkRenderer
{
public LinkRenderer(Item item) : base(item)
{
}
protected override string GetUrl(XmlField field)
{
if (field != null)
return new CustomLinkUrl().GetUrl(field, this.Item.Database);
return LinkManager.GetItemUrl(this.Item, XslHelper.GetUrlOptions());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment