Skip to content

Commit 8c46db9

Browse files
committed
Added comment blocks
1 parent 5ac1a64 commit 8c46db9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Ignia.Topics.Web.Mvc/Controllers/LayoutControllerBase{T}.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,25 @@ public virtual PartialViewResult Menu() {
149149
/// <param name="fromRoot">The distance that the navigation root should be from the root of the topic graph.</param>
150150
/// <param name="defaultRoot">If a root cannot be identified, the default root that should be returned.</param>
151151
protected Topic GetNavigationRoot(Topic currentTopic, int fromRoot = 2, string defaultRoot = "Web") {
152+
153+
/*------------------------------------------------------------------------------------------------------------------------
154+
| Find navigation root
155+
\-----------------------------------------------------------------------------------------------------------------------*/
152156
var navigationRootTopic = currentTopic;
153157
while (DistanceFromRoot(navigationRootTopic) > fromRoot) {
154158
navigationRootTopic = navigationRootTopic.Parent;
155159
}
156160

161+
/*------------------------------------------------------------------------------------------------------------------------
162+
| Handle default, if necessary
163+
\-----------------------------------------------------------------------------------------------------------------------*/
157164
if (navigationRootTopic == null && !String.IsNullOrWhiteSpace(defaultRoot)) {
158165
navigationRootTopic = TopicRepository.Load(defaultRoot);
159166
}
160167

168+
/*------------------------------------------------------------------------------------------------------------------------
169+
| Return navigation root
170+
\-----------------------------------------------------------------------------------------------------------------------*/
161171
return navigationRootTopic;
162172

163173
}

0 commit comments

Comments
 (0)