BreadcrumbLabel.Text = GetBreadcrumb(contentAsset);
where contentAsset is the current page's asset
{return GetBreadcrumbHelper(asset) + "</ul>";
}
private string GetBreadcrumbHelper(ContentAsset asset)
{string html = "<li><a href=\"" + asset.Link + "\">" + asset.Title + "</a></li>";
if (asset.Parent == null || asset.Parent == string.Empty)
{ html = "<ul>" + html;
}
else
{ html = GetBreadcrumbHelper(contentDomain.GetContentAssetByName(asset.Parent)) + html;
}
}