private string GetPresenterViewLocations(string nodePath, NodeType nodeType)
{
var action = HttpContext.Current.Request.Params[ActionParamName] ?? String.Empty;
if (action.Length > 0)
action = String.Concat("/", action, PresenterPagePostfix);
string[] parts = nodePath.Split('/');
var probs = new List<string>();
var nt = nodeType;
while (nt != null)
{
probs.Add(String.Concat("/{0}/", nt.Name, "{1}", action));
nt = nt.Parent;
}
StringBuilder sb = new StringBuilder();
sb.Append("<r>");
sb.Append("<p>").Append(nodePath).Append("/").Append(PresenterFolderName).Append("/This").Append(PresenterPagePostfix).Append(action).Append("</p>");
var position = parts.Length + 1;
string partpath;
while (position-- > 2)
{
partpath = string.Join("/", parts, 0, position);
foreach (var prob in probs)
sb.AppendFormat("<p>{0}{1}</p>", partpath, string.Format(prob, PresenterFolderName, PresenterPagePostfix));
}
partpath = "/Root/System";
foreach (var prob in probs)
sb.AppendFormat("<p>{0}{1}</p>", partpath, string.Format(prob, PresenterFolderName, PresenterPagePostfix));
sb.Append("</r>");
return sb.ToString();
}