public HtmlListItem Link(string text, string url, object htmlAttributes, string identifier = null)
{
var attrs = new HtmlAttributes(htmlAttributes);
var link = new HtmlListItem(string.Format("<a href=\"{0}\" {2}>{1}</a>", url, text, attrs));
var currActive = _list.HtmlAttributes["data-activeLink"];
if (!string.IsNullOrEmpty(identifier) && currActive == identifier)
{
link.Active();
}
_list.ListItems.Add(link);
return(link);
}