OtoNoOto
2/28/2018 - 12:44 AM

_Functions addition for getting Link Target attribute.

_Functions addition for getting Link Target attribute.

/// <summary>
/// Get a link's action suitable for use in the 'a' attribute.
/// </summary>
/// <param name="link">Link element</param>
/// <param name="url">Url helper</param>
/// <returns>Link action</returns>

public static string GetLinkTarget(ICMSLinkElement link, UrlHelper url)
{
	String linkUrl = "";
	if (link != null)
	{
		linkUrl = (!String.IsNullOrWhiteSpace(link.GetAttributeValue("CustomURLTarget"))) ? link.GetAttributeValue("CustomURLTarget") : link.GetAttributeValue("Target");
	}
	//remove tfrm=4 for page preview
	return linkUrl;
}