@inherits umbraco.MacroEngines.DynamicNodeContext
@using System.Collections;
@{ List<string> qa = new List<string>(); } //this is not defined in the recursive helper below
@helper traverseFirst(dynamic node){
var items = node.Children.Where("umbracoNaviHide != true");
foreach (var item in items) {
foreach(var subItem in item.Descendants()) {
if(subItem.Id == Model.Id)
{
qa.Add();
break;
}
}
@traverseFirst(item)
}
}
@traverseFirst(@Model.AncestorOrSelf("Book"))
變量qa canot在遞歸助手中被訪問。有沒有解決的辦法?剃刀:爲什麼我的變量不在範圍內
Wow..thanks很多 – Luke101 2011-05-23 18:11:50