Override Path property on Templates to reflect the TreePath for deep linking

This commit is contained in:
agrath@gmail.com
2012-06-11 11:08:51 -01:00
parent fa426643ed
commit 5f1725e807

View File

@@ -159,6 +159,41 @@ namespace umbraco.cms.businesslogic.template
return masterpageContent;
}
public new string Path
{
get
{
List<int> path = new List<int>();
Template working = this;
while (working != null)
{
path.Add(working.Id);
try
{
if (working.MasterTemplate != 0)
{
working = new Template(working.MasterTemplate);
}
else
{
working = null;
}
}
catch (ArgumentException)
{
working = null;
}
}
path.Add(-1);
path.Reverse();
string sPath = string.Join(",", path.ConvertAll(item => item.ToString()).ToArray());
return sPath;
}
set
{
base.Path = value;
}
}
public string Alias
{