Resolve "Component: Text Element Navigator" #67

Merged
thorsten merged 43 commits from 11-component-text-element-navigator into main 2022-07-23 19:29:16 +00:00
Showing only changes of commit 5428cb9489 - Show all commits
@@ -137,4 +137,17 @@ public static class SectionProcessor
} }
public static Section GetSection(DataContext db, string sectionKey) => db.Sections.First(n => n.DataKey == sectionKey); public static Section GetSection(DataContext db, string sectionKey) => db.Sections.First(n => n.DataKey == sectionKey);
public static string GetSectionPath(DataContext db, string sectionKey)
{
var section = db.Sections.First(n => n.DataKey == sectionKey);
var path = section.Name;
while (section.Parent != null)
{
section = section.Parent;
path = $"{section.Name}/{path}";
}
return $"Section's path: {path}";
}
} }